@font-face {
    font-family: iransans;
    font-style: normal;
    font-weight: normal;
    src: url('fonts/IRANSansWeb.eot');
    src: url('fonts/IRANSansWeb.eot-.htm#iefix') format('embedded-opentype'),
         url('fonts/IRANSansWeb.woff2') format('woff2'),
         url('fonts/IRANSansWeb.woff') format('woff'),
         url('fonts/IRANSansWeb.ttf') format('truetype');
}

/* محفظه اصلی تقویم */
.en-calendar-container {
    font-family: 'iransans', 'Tahoma', sans-serif;
    max-width: 500px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    direction: rtl;
}

/* هدر تقویم */
.en-calendar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.en-calendar-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.en-calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.en-calendar-title {
    font-size: 18px;
    font-weight: 600;
}

/* روزهای هفته */
.en-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

/* روزهای ماه */
.en-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 16px;
}

.en-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
    font-weight: 500;
    position: relative;
}

.en-calendar-day:hover {
    background: #f1f5f9;
    transform: scale(1.05);
}

/* روز جاری (امروز) */
.en-calendar-day.today {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

/* روزهای دارای رویداد - پس‌زمینه سبز */
.en-calendar-day.has-event {
    background: #10b981 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.en-calendar-day.has-event:hover {
    background: #059669 !important;
    transform: scale(1.05);
}

/* اگر روز دارای رویداد و همچنین امروز باشد */
.en-calendar-day.has-event.today {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

/* حذف نقطه قرمز زیر روز */
.en-calendar-day.has-event::after {
    display: none;
}

/* روزهای غیرفعال (ماه قبل/بعد) */
.en-calendar-day.other-month {
    color: #cbd5e1;
    cursor: default;
    background: transparent !important;
}

.en-calendar-day.other-month:hover {
    background: transparent !important;
    transform: none;
}

/* ======================================== */
/* پاپ‌آپ رویداد - سایز ثابت و فونت ثابت */
/* ======================================== */

.en-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.en-popup[style*="display: block"],
.en-popup[style*="display: flex"] {
    display: flex !important;
}

/* سایز ثابت و استاندارد برای پاپ‌آپ */
.en-popup-content {
    position: relative;
    background: white;
    border-radius: 28px;
    width: 400px;
    min-width: 320px;
    max-width: 450px;
    height: auto;
    min-height: 220px;
    max-height: 80vh;
    overflow: hidden;
    animation: enPopupFadeIn 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto;
    display: flex;
    flex-direction: column;
}

.en-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    flex-shrink: 0;
}

.en-popup-header h3 {
        font-family: 'iransans';
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 600;
}

.en-popup-header h3 small {
    font-size: 11px;
    opacity: 0.8;
    font-weight: normal;
}

.en-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.en-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ========== بخش مهم: فونت ثابت برای توضیحات ========== */

/* بدنه پاپ‌آپ */
.en-popup-body {
    font-family: 'iransans';
    padding: 24px;
    line-height: 1.7;
    color: #334155;
    overflow-y: auto;
    flex: 1;
}

/* همه عناصر داخل بدنه - فونت کاملاً ثابت 14px */
.en-popup-body,
.en-popup-body * {

    line-height: 1.7 !important;
    font-weight: normal !important;
}

/* استثنا: اگر می‌خوای bold یا strong کوچولو متفاوت باشه، فقط وزنش عوض بشه */
.en-popup-body strong,
.en-popup-body b {
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* استثنا: لینک‌ها اگر داشتیم */
.en-popup-body a {
    font-size: 14px !important;
    text-decoration: none;
}

.en-popup-body a:hover {
    text-decoration: underline;
}

/* پاراگراف‌ها */
.en-popup-body p {
    margin: 0 0 12px 0 !important;
   
    line-height: 1.7 !important;
}

/* آخرین پاراگراف حاشیه نداشته باشه */
.en-popup-body p:last-child {
    margin-bottom: 0 !important;
}

/* لیست‌ها */
.en-popup-body ul,
.en-popup-body ol {
    margin: 8px 0 12px 20px !important;
    padding-right: 0 !important;
}

.en-popup-body li {
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 4px !important;
}

/* عنوان‌های داخل متن (اگر باشه) */
.en-popup-body h1,
.en-popup-body h2,
.en-popup-body h3,
.en-popup-body h4,
.en-popup-body h5,
.en-popup-body h6 {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 12px 0 8px 0 !important;
    line-height: 1.4 !important;
}

/* اسکرول برای متن‌های طولانی */
.en-popup-body::-webkit-scrollbar {
    width: 5px;
}

.en-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.en-popup-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

/* استایل‌های مختلف برای انواع رویداد در هدر پاپ‌آپ */
.en-popup[data-type="info"] .en-popup-header { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.en-popup[data-type="success"] .en-popup-header { background: linear-gradient(135deg, #10b981, #059669); }
.en-popup[data-type="warning"] .en-popup-header { background: linear-gradient(135deg, #f59e0b, #d97706); }
.en-popup[data-type="danger"] .en-popup-header { background: linear-gradient(135deg, #ef4444, #dc2626); }
.en-popup[data-type="birthday"] .en-popup-header {
    background: linear-gradient(135deg, #f70, #db2777);
}
.en-popup[data-type="holiday"] .en-popup-header { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

@keyframes enPopupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ریسپانسیو برای موبایل */
@media (max-width: 550px) {
    .en-calendar-container {
        margin: 10px;
        border-radius: 20px;
    }
    
    .en-calendar-days {
        gap: 2px;
        padding: 12px;
    }
    
    .en-calendar-day {
        font-size: 12px;
    }
    
    .en-popup-content {
        width: 92%;
        min-width: auto;
        max-width: 92%;
        min-height: 180px;
        border-radius: 24px;
    }
    
    .en-popup-header {
        padding: 14px 18px;
    }
    
    .en-popup-header h3 {
        font-size: 1rem;
    }
    
    .en-popup-body {
        padding: 18px;
    }
    
    /* موبایل: فونت 13px */
    .en-popup-body,
    .en-popup-body * {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
}