/**
 * Lịch Xitô Thánh Gia - Styles
 * Tương thích với Flatsome Theme
 */

:root {
    /* Màu phụng vụ */
    --xito-purple: #663399;
    --xito-white: #ffffff;
    --xito-red: #dc3545;
    --xito-green: #28a745;
    --xito-pink: #e83e8c;
    --xito-gold: #ffc107;
    --xito-gray: #f3880e;
    --xito-light-yellow: #ffeaa7;
    
    /* Màu chủ đạo động (sẽ thay đổi theo màu phụng vụ) */
    --liturgical-primary: #663399;
    --liturgical-primary-light: #8854b8;
    --liturgical-primary-dark: #552288;
    --liturgical-primary-rgb: 102, 51, 153;
    --liturgical-text-secondary: #dc3c02; /* Màu chữ phụ - vàng nhạt */
    --liturgical-text-muted: rgba(255, 255, 255, 0.8); /* Màu chữ mờ */
}

/* Màu phụng vụ Tím (Mùa Vọng, Mùa Chay) */
body.liturgy-tm {
    --liturgical-primary: #663399;
    --liturgical-primary-light: #8854b8;
    --liturgical-primary-dark: #552288;
    --liturgical-primary-rgb: 102, 51, 153;
    --liturgical-text-secondary: #ffeaa7; /* Vàng nhạt - dễ đọc trên nền tím */
    --liturgical-text-muted: rgba(255, 234, 167, 0.8);
}

/* Màu phụng vụ Trắng (Giáng Sinh, Phục Sinh, Lễ Trọng) */
body.liturgy-tr {
    --liturgical-primary: #ffffff;
    --liturgical-primary-light: #f8f9fa;
    --liturgical-primary-dark: #e9ecef;
    --liturgical-primary-rgb: 255, 255, 255;
    --liturgical-text-secondary: #fba13a; /* Xám - dễ đọc trên nền sáng */
    --liturgical-text-muted: rgba(251, 197, 47, 0.8);
}

body.liturgy-tr .lich-xito-header h2,
body.liturgy-tr .lich-xito-header,
body.liturgy-tr .lich-xito-nav button {
    color: #333;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #ddd;
}

body.liturgy-tr .lich-xito-nav button:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

body.liturgy-tr .lich-xito-day-header {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

body.liturgy-tr .lich-xito-modal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    border-bottom: 3px solid #ddd;
}

body.liturgy-tr .lich-xito-modal-header h3 {
    color: #333;
}

body.liturgy-tr .lich-xito-modal-date {
    color: #6c757d;
}

body.liturgy-tr .lich-xito-modal-close {
    color: #333;
}

body.liturgy-tr .lich-xito-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.liturgy-tr .lich-xito-today-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

body.liturgy-tr .lich-xito-today-card h3 {
    color: #333;
}

body.liturgy-tr .lich-xito-today-card .date {
    color: #6c757d;
}

body.liturgy-tr .lich-xito-today-card .liturgy {
    border-top-color: #dee2e6;
    border-bottom-color: #dee2e6;
    color: #333;
}

body.liturgy-tr .lich-xito-widget h3 {
    color: var(--liturgical-primary);
}

body.liturgy-tr .lich-xito-widget-content {
    color: #495057;
}

/* Màu phụng vụ Đỏ (Chúa Thánh Thần, Tử Đạo) */
body.liturgy-d {
    --liturgical-primary: #dc3545;
    --liturgical-primary-light: #e4606d;
    --liturgical-primary-dark: #c82333;
    --liturgical-primary-rgb: 220, 53, 69;
    --liturgical-text-secondary: #ffe4e1; /* Vàng kem nhạt - dễ đọc trên nền đỏ */
    --liturgical-text-muted: rgba(255, 255, 255, 0.85);
}

/* Màu phụng vụ Xanh (Thường Niên) */
body.liturgy-x {
    --liturgical-primary: #28a745;
    --liturgical-primary-light: #48b461;
    --liturgical-primary-dark: #218838;
    --liturgical-primary-rgb: 40, 167, 69;
    --liturgical-text-secondary: #f1f8e9; /* Vàng xanh nhạt - dễ đọc trên nền xanh */
    --liturgical-text-muted: rgba(255, 255, 255, 0.9);
}

/* Màu phụng vụ Hồng (Chúa Nhật đặc biệt) */
body.liturgy-hong {
    --liturgical-primary: #e83e8c;
    --liturgical-primary-light: #ec5fa0;
    --liturgical-primary-dark: #d6277a;
    --liturgical-primary-rgb: 232, 62, 140;
    --liturgical-text-secondary: #fff8dc; /* Vàng kem - dễ đọc trên nền hồng */
    --liturgical-text-muted: rgba(255, 255, 255, 0.85);
}

/* Container chính */
.lich-xito-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Ensure all child elements use border-box */
.lich-xito-container * {
    box-sizing: border-box;
}

/* Header lịch */
.lich-xito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--liturgical-primary);
    transition: border-color 0.3s ease;
    flex-wrap: wrap;
    gap: 15px;
}

.lich-xito-header-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.lich-xito-header h2 {
    margin: 0;
    color: var(--liturgical-primary);
    font-size: 32px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.lich-xito-subtitle {
    margin: 0;
    transition: color 0.3s ease;
}

.lich-xito-year-badge {
    display: inline-block;
    color: #dc3545;
    font-size: 24px;
    font-weight: 900;
    padding: 5px 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.lich-xito-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lich-xito-nav button {
    background: var(--liturgical-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.lich-xito-nav button:hover {
    background: var(--liturgical-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--liturgical-primary-rgb), 0.3);
}

.lich-xito-nav .current-month {
    font-weight: 700;
    font-size: 18px;
    color: var(--liturgical-primary);
    min-width: 200px;
    text-align: center;
    transition: color 0.3s ease;
}

/* Lịch tháng */
.lich-xito-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.lich-xito-day-header {
    background: var(--liturgical-primary);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.lich-xito-day {
    background: white;
    min-height: 120px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lich-xito-day:hover {
    background: #f8f9fa;
    border-color: var(--liturgical-primary);
    transform: scale(1.02);
}

.lich-xito-day.other-month {
    background: #f8f9fa;
    opacity: 0.5;
}

.lich-xito-day.today {
    background: rgba(var(--liturgical-primary-rgb), 0.1);
    border-color: var(--liturgical-primary);
    box-shadow: 0 0 10px rgba(var(--liturgical-primary-rgb), 0.3);
}

.lich-xito-day.has-event {
    background: #fff3cd;
}

.lich-xito-day-number {
    font-weight: 700;
    font-size: 18px;
    color: #333;
    margin-bottom: 3px;
}

.lich-xito-lunar-date {
    font-size: 10px;
    color: var(--liturgical-text-muted);
    font-weight: 500;
    margin-bottom: 5px;
    font-style: italic;
    transition: color 0.3s ease;
}

.lich-xito-day.today .lich-xito-day-number {
    background: var(--liturgical-primary);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

/* Màu phụng vụ */
.lich-xito-color-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.color-tm { background: var(--xito-purple); }
.color-tr { background: var(--xito-white); border: 2px solid #ddd; }
.color-d { background: var(--xito-red); }
.color-x { background: var(--xito-green); }
.color-hong { background: var(--xito-pink); }

.lich-xito-lit {
    font-size: 11px;
    line-height: 1.3;
    color: #495057;
    margin-top: 5px;
    font-weight: 600;
}

.lich-xito-event-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--xito-gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Modal chi tiết ngày */
.lich-xito-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lich-xito-modal-content {
    background: white;
    margin: 50px auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    max-height: 85vh;
    overflow-y: auto;
}

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

.lich-xito-modal-header {
    background: var(--liturgical-primary);
    color: white;
    padding: 25px;
    border-radius: 12px 12px 0 0;
    position: relative;
    transition: background-color 0.3s ease;
}

.lich-xito-modal-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #fce7b8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.lich-xito-modal-date {
    font-size: 16px;
    color: #fce7b8;
    font-weight: 600;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lich-xito-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: 700;
    color: #fce7b8;
    cursor: pointer;
    transition: all 0.3s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lich-xito-modal-close:hover {
    background: rgba(237, 195, 8, 0.2);
    transform: rotate(90deg);
}

.lich-xito-modal-body {
    padding: 30px;
    background: #fffef8;
}

.lich-xito-reading {
    background: #fffbf0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c9960f;
    transition: border-color 0.3s ease;
}

.lich-xito-reading h4 {
    margin: 0 0 10px 0;
    color: #a67c00;
    font-size: 18px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.lich-xito-reading p {
    margin: 0;
    color: #a67c00;
    line-height: 1.6;
    font-weight: 500;
}

.lich-xito-events {
    margin-top: 20px;
}

.lich-xito-event-item {
    background: #fffbf0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid #f5e6c8;
    transition: all 0.3s;
}

.lich-xito-event-item:hover {
    box-shadow: 0 4px 12px rgba(201, 150, 15, 0.3);
    transform: translateX(5px);
    border-color: #c9960f;
}

.lich-xito-event-item strong {
    color: #a67c00;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    transition: color 0.3s ease;
    font-weight: 700;
}

.lich-xito-event-item .sub-item {
    display: block;
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: #8b6f00;
    font-weight: 500;
}

.lich-xito-event-item .sub-item:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #c9960f;
    font-weight: bold;
    transition: color 0.3s ease;
}

.death-item {
    display: block;
    padding: 5px 0;
    padding-left: 25px;
    color: #8b6f00;
    position: relative;
    font-weight: 500;
}

.cross-icon {
    position: absolute;
    left: 5px;
    color: #dc3545;
    font-weight: bold;
}

/* View hôm nay */
.lich-xito-today-card {
    background: linear-gradient(135deg, var(--liturgical-primary) 0%, var(--liturgical-primary-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(var(--liturgical-primary-rgb), 0.3);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.lich-xito-today-card h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    color: #fce7b8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lich-xito-today-card .date {
    font-size: 18px;
    color: #fce7b8;
    margin-bottom: 20px;
    transition: color 0.3s ease;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lich-xito-today-card .liturgy {
    font-size: 20px;
    font-weight: 600;
    padding: 15px 0;
    border-top: 2px solid var(--liturgical-text-muted);
    border-bottom: 2px solid var(--liturgical-text-muted);
    transition: border-color 0.3s ease;
    color: #fce7b8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Widget */
.lich-xito-widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lich-xito-widget h3 {
    margin: 0 0 15px 0;
    color: #fce7b8;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 2px solid var(--liturgical-primary);
    padding-bottom: 10px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.lich-xito-widget-content {
    font-size: 14px;
    line-height: 1.6;
    color: #fce7b8;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Liturgical season indicator */
.liturgical-season-indicator {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(var(--liturgical-primary-rgb), 0.15);
    border: 1px solid var(--liturgical-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--liturgical-text-secondary);
    margin-left: 15px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

/* Season indicator text color for different liturgical colors */
body.liturgy-tm .liturgical-season-indicator {
    color: var(--liturgical-primary);
    background: rgba(var(--liturgical-primary-rgb), 0.15);
}

body.liturgy-tr .liturgical-season-indicator {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

body.liturgy-d .liturgical-season-indicator {
    color: var(--liturgical-primary-dark);
    background: rgba(var(--liturgical-primary-rgb), 0.15);
}

body.liturgy-x .liturgical-season-indicator {
    color: var(--liturgical-primary-dark);
    background: rgba(var(--liturgical-primary-rgb), 0.15);
}

body.liturgy-hong .liturgical-season-indicator {
    color: var(--liturgical-primary-dark);
    background: rgba(var(--liturgical-primary-rgb), 0.15);
}

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

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .lich-xito-container {
        padding: 15px;
    }
    
    .lich-xito-day {
        min-height: 100px;
        padding: 8px;
    }
    
    .lich-xito-day-number {
        font-size: 16px;
    }
    
    .lich-xito-lit {
        font-size: 10px;
    }
}

/* Responsive - Mobile Large (768px - 480px) */
@media (max-width: 768px) {
    .lich-xito-container {
        padding: 10px;
        overflow-x: hidden;
    }
    
    .lich-xito-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .lich-xito-header-title {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    
    .lich-xito-header h2 {
        font-size: 24px;
        margin: 0;
    }
    
    .lich-xito-subtitle {
        font-size: 12px;
        margin: 0;
    }
    
    .lich-xito-year-badge {
        font-size: 18px;
        padding: 4px 12px;
        letter-spacing: 1.5px;
    }
    
    .lich-xito-nav {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        align-items: center;
    }
    
    .lich-xito-nav button {
        padding: 8px 12px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .lich-xito-nav .current-month {
        font-size: 14px;
        min-width: auto;
        text-align: center;
    }
    
    .lich-xito-nav .lich-xito-today-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
    
    .liturgical-season-indicator {
        margin-left: 0;
        margin-top: 5px;
        font-size: 10px;
        padding: 4px 8px;
        display: inline-block;
        width: fit-content;
    }
    
    /* Calendar Grid */
    .lich-xito-calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 1px;
        background: #e9ecef;
    }
    
    .lich-xito-day-header {
        padding: 8px 2px;
        font-size: 11px;
    }
    
    .lich-xito-day {
        min-height: 70px;
        padding: 4px;
        font-size: 11px;
    }
    
    .lich-xito-day-number {
        font-size: 13px;
        margin-bottom: 2px;
    }
    
    .lich-xito-lunar-date {
        font-size: 9px;
        margin-bottom: 3px;
    }
    
    .lich-xito-lit {
        font-size: 8px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .lich-xito-color-badge {
        width: 8px;
        height: 8px;
        margin-right: 3px;
    }
    
    .lich-xito-event-dot {
        width: 6px;
        height: 6px;
        bottom: 3px;
        right: 3px;
    }
    
    /* Modal */
    .lich-xito-modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .lich-xito-modal-header {
        padding: 15px;
    }
    
    .lich-xito-modal-header h3 {
        font-size: 18px;
        margin-bottom: 8px;
        color: #fce7b8 !important;
        font-weight: 700;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .lich-xito-modal-date {
        font-size: 13px;
        color: #fce7b8 !important;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .lich-xito-modal-close {
        color: #fce7b8 !important;
        font-weight: 700;
    }
    
    .lich-xito-modal-body {
        padding: 15px;
    }
    
    .lich-xito-reading {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .lich-xito-reading h4 {
        font-size: 15px;
    }
    
    .lich-xito-reading p {
        font-size: 13px;
    }
    
    .lich-xito-event-item {
        padding: 10px;
        margin-bottom: 10px;
        font-size: 13px;
    }
    
    /* Today Card - Mobile */
    .lich-xito-today-card {
        padding: 20px;
    }
    
    .lich-xito-today-card h3 {
        font-size: 22px;
        color: #fce7b8 !important;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .lich-xito-today-card .liturgy {
        font-size: 16px;
        color: #fce7b8 !important;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .lich-xito-today-card .date {
        color: #fce7b8 !important;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    /* Widget - Mobile */
    .lich-xito-widget h3 {
        color: #fce7b8 !important;
        font-weight: 700;
    }
    
    .lich-xito-widget-content {
        color: #fce7b8 !important;
        font-weight: 500;
    }
    
    /* Legend */
    .lich-xito-legend {
        padding: 12px !important;
        font-size: 12px;
    }
    
    .lich-xito-legend strong {
        font-size: 13px !important;
    }
}

/* Responsive - Mobile Small (< 480px) */
@media (max-width: 480px) {
    .lich-xito-container {
        padding: 8px;
    }
    
    .lich-xito-header-title {
        gap: 8px;
    }
    
    .lich-xito-header h2 {
        font-size: 20px;
    }
    
    .lich-xito-year-badge {
        font-size: 16px;
        padding: 3px 10px;
        letter-spacing: 1px;
    }
    
    .lich-xito-nav {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .lich-xito-nav .lich-xito-prev-month {
        grid-column: 1;
    }
    
    .lich-xito-nav .lich-xito-next-month {
        grid-column: 2;
    }
    
    .lich-xito-nav .current-month {
        grid-column: 1 / -1;
        order: -1;
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 5px;
    }
    
    .lich-xito-nav .lich-xito-today-btn {
        grid-column: 1 / -1;
        margin-top: 5px;
    }
    
    .liturgical-season-indicator {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    /* Calendar - Very Compact */
    .lich-xito-day-header {
        padding: 6px 1px;
        font-size: 10px;
    }
    
    .lich-xito-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .lich-xito-day-number {
        font-size: 12px;
    }
    
    .lich-xito-lunar-date {
        font-size: 8px;
    }
    
    .lich-xito-lit {
        font-size: 7px;
        -webkit-line-clamp: 1;
    }
    
    .lich-xito-color-badge {
        width: 6px;
        height: 6px;
    }
    
    .lich-xito-day.today .lich-xito-day-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    /* Modal - Full Screen on Small Devices */
    .lich-xito-modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }
    
    .lich-xito-modal-header {
        padding: 12px;
        border-radius: 0;
    }
    
    .lich-xito-modal-header h3 {
        font-size: 16px;
        padding-right: 40px;
        color: #fce7b8 !important;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        line-height: 1.4;
    }
    
    .lich-xito-modal-date {
        color: #fce7b8 !important;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .lich-xito-modal-close {
        font-size: 28px;
        width: 36px;
        height: 36px;
        color: #fce7b8 !important;
        font-weight: 700;
    }
    
    .lich-xito-modal-body {
        padding: 12px;
    }
    
    .lich-xito-reading {
        padding: 10px;
    }
    
    .lich-xito-reading h4 {
        font-size: 14px;
    }
    
    .lich-xito-reading p {
        font-size: 12px;
    }
    
    .lich-xito-event-item {
        padding: 8px;
        font-size: 12px;
    }
    
    .lich-xito-event-item strong {
        font-size: 13px;
    }
    
    /* Today Card - Mobile Small */
    .lich-xito-today-card {
        padding: 15px;
    }
    
    .lich-xito-today-card h3 {
        font-size: 20px;
        color: #fce7b8 !important;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        margin-bottom: 10px;
    }
    
    .lich-xito-today-card .liturgy {
        font-size: 15px;
        color: #fce7b8 !important;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .lich-xito-today-card .date {
        font-size: 14px;
        color: #fce7b8 !important;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    /* Widget - Mobile Small */
    .lich-xito-widget {
        padding: 15px;
    }
    
    .lich-xito-widget h3 {
        font-size: 18px;
        color: #fce7b8 !important;
        font-weight: 700;
    }
    
    .lich-xito-widget-content {
        font-size: 13px;
        color: #fce7b8 !important;
        font-weight: 500;
    }
    
    /* Legend - Compact */
    .lich-xito-legend {
        padding: 10px !important;
        font-size: 11px;
    }
    
    .lich-xito-legend > div > div {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .lich-xito-legend strong {
        font-size: 12px !important;
        margin-bottom: 5px !important;
    }
}

@media (max-width: 480px) {
    .lich-xito-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .lich-xito-day-number {
        font-size: 12px;
    }
    
    .lich-xito-lit {
        display: none;
    }
}

/* Tích hợp với Flatsome */
.page-wrapper .lich-xito-container {
    margin-top: 30px;
    margin-bottom: 30px;
}

body.flatsome .lich-xito-nav button {
    font-family: inherit;
}

/* Print styles */
@media print {
    .lich-xito-nav,
    .lich-xito-event-dot,
    .lich-xito-modal {
        display: none;
    }
    
    .lich-xito-day {
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
}



