/* ==========================================================================
   Smart Short Link Pro - Public Styles (Frontend)
   Version: 1.0.0
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* ==========================================================================
   Base Box
   ========================================================================== */
.sslp-box {
    --sslp-bg: #f8f9fa;
    --sslp-btn: #6366f1;
    --sslp-text: #1e293b;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    margin: 8px 16px 20px 0;
    /* تحسين الهوامش */
    width: 100%;
    max-width: 280px;
    /* تصغير الحد الأقصى للعرض */
    float: left;
    /* البقاء في جهة اليسار */
    clear: both;
}

.sslp-box__inner {
    padding: 12px 14px;
    /* تقليل الحشو */
    border-radius: 12px;
}

/* ==========================================================================
   Style: Flat
   ========================================================================== */
.sslp-box--flat .sslp-box__inner {
    background: var(--sslp-bg);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

/* ==========================================================================
   Style: Modern (Default)
   ========================================================================== */
.sslp-box--modern .sslp-box__inner {
    background: var(--sslp-bg);
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.sslp-box--modern .sslp-box__inner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
}

/* ==========================================================================
   Style: Glassmorphism
   ========================================================================== */
.sslp-box--glassmorphism .sslp-box__inner {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(31, 38, 135, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Header
   ========================================================================== */
.sslp-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.sslp-box__icon {
    font-size: 18px;
    /* تصغير الأيقونة */
    line-height: 1;
}

.sslp-box__title {
    font-size: 13px;
    /* تصغير الخط */
    font-weight: 700;
    color: var(--sslp-text);
    margin: 0;
}

/* ==========================================================================
   URL Row
   ========================================================================== */
.sslp-box__url-row {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    /* منع الالتفاف في العرض العادي */
}

.sslp-box__url-input {
    flex: 1;
    padding: 8px 10px;
    /* تقليل الحشو */
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    font-family: 'Cairo', monospace;
    font-size: 12px;
    /* تصغير الخط */
    color: #6366f1;
    background: rgba(99, 102, 241, 0.04);
    outline: none;
    cursor: text;
    direction: ltr;
    text-align: right;
    transition: border-color 0.2s;
}

.sslp-box__url-input:focus {
    border-color: #6366f1;
}

.sslp-box__copy-btn.tiny-btn {
    padding: 6px;
    width: 32px;
    height: 32px;
    justify-content: center;
    border-radius: 8px;
    background: var(--sslp-btn);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.sslp-box__copy-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sslp-box__copy-btn:active {
    transform: scale(0.9);
}

.sslp-box__copy-btn.copied {
    background: #10b981 !important;
}

.sslp-copy-icon {
    font-size: 16px;
}

.sslp-copy-text {
    font-size: 13px;
}

/* ==========================================================================
   Share Row
   ========================================================================== */
.sslp-box__share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sslp-box__share-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
}

.sslp-box__share-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sslp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    /* جعله دائرياً أو مربعاً صغيراً */
    height: 32px;
    padding: 0;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 0;
    /* إخفاء النص للبقاء على الأيقونة فقط */
    color: white !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.sslp-share-btn span {
    display: none;
    /* إخفاء النص لتقليل الحجم */
}

.sslp-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    color: white !important;
}

.sslp-share-btn svg {
    flex-shrink: 0;
}

.sslp-share-btn--facebook {
    background: #1877f2;
}

.sslp-share-btn--whatsapp {
    background: #25d366;
}

.sslp-share-btn--twitter {
    background: #000000;
}

.sslp-share-btn--telegram {
    background: #0088cc;
}

.sslp-share-btn--facebook:hover {
    background: #1565c0;
}

.sslp-share-btn--whatsapp:hover {
    background: #1da851;
}

.sslp-share-btn--twitter:hover {
    background: #1a1a1a;
}

.sslp-share-btn--telegram:hover {
    background: #0077b5;
}

/* ==========================================================================
   QR Code
   ========================================================================== */
.sslp-box__qr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.sslp-box__qr img {
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    padding: 4px;
    background: white;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 600px) {
    .sslp-box {
        float: none;
        max-width: 100%;
        margin: 0 0 24px 0;
    }

    .sslp-box__inner {
        padding: 16px 14px;
    }

    .sslp-box__url-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sslp-box__copy-btn {
        width: 100%;
        justify-content: center;
    }

    .sslp-box__share-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .sslp-share-btn span {
        display: none;
    }

    .sslp-share-btn {
        padding: 8px 10px;
        border-radius: 50%;
    }
}

/* ==========================================================================
   Animation: Copy Feedback
   ========================================================================== */
@keyframes sslp-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.sslp-box__copy-btn.copied {
    animation: sslp-pulse 0.3s ease;
}