/**
 * IslamBook Sebha Counter - Styles
 * تصميم مطابق لموقع islambook.com مع دعم الحجم الديناميكي
 */

/* الحاوية الرئيسية */
.islambook-sebha-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    font-family: 'Amiri', 'Traditional Arabic', 'Arial', sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* العنوان */
.sebha-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: center;
    direction: rtl;
}

/* النص (آية/حديث/دعاء) */
.sebha-content {
    font-size: 20px;
    line-height: 2;
    margin: 20px auto 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    text-align: center;
    direction: rtl;
    max-width: 90%;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-weight: 500;
    color: inherit;
    border: 2px solid rgba(125, 211, 192, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sebha-content p {
    margin: 0;
}

/* تنسيق خاص للآيات القرآنية */
.sebha-content.quran {
    font-size: 22px;
    font-family: 'Amiri Quran', 'Amiri', serif;
}

/* حاوية الدائرة - الحجم ديناميكي عبر JavaScript */
.sebha-circle-container {
    position: relative;
    margin: 0 auto 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
    /* الحجم الافتراضي سيتم تعيينه عبر JavaScript */
}

.sebha-circle-container:hover {
    transform: scale(1.05);
}

.sebha-circle-container:active {
    transform: scale(0.95);
}

/* الدائرة SVG */
.sebha-circle {
    width: 100%;
    height: 100%;
    display: block;
}

.progress-circle {
    stroke-dasharray: 565.48; /* 2 * PI * 90 */
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 0.3s ease;
}

/* الرقم المتبقي داخل الدائرة */
.sebha-remaining {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    pointer-events: none;
    direction: ltr;
    line-height: 1;
    /* حجم الخط سيتم تعيينه عبر JavaScript بناءً على حجم الدائرة */
}

.remaining-number {
    display: inline-block;
}

/* تأثير النبض عند التحديث */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.remaining-number.pulse {
    animation: pulse 0.3s ease;
}

/* العداد */
.sebha-counter {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: bold;
    direction: ltr;
}

.current-count {
    font-size: 32px;
    font-weight: bold;
}

.target-count {
    font-size: 28px;
}

/* زر إعادة التعيين */
.sebha-reset-btn {
    padding: 12px 40px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: 'Amiri', 'Traditional Arabic', 'Arial', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sebha-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sebha-reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* رسالة الإكمال */
.sebha-completion-message {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(125, 211, 192, 0.2);
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تأثير الاهتزاز عند الإكمال */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* دعم RTL */
[dir="rtl"] .islambook-sebha-container {
    direction: rtl;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .islambook-sebha-container {
        padding: 30px 20px;
    }
    
    .sebha-title {
        font-size: 24px;
    }
    
    .sebha-counter {
        font-size: 20px;
    }
    
    .current-count {
        font-size: 28px;
    }
    
    .target-count {
        font-size: 24px;
    }
    
    .sebha-reset-btn {
        padding: 10px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .sebha-title {
        font-size: 20px;
    }
}

/* تحميل خط Amiri من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');
