/* Cielo Mystic Calendar - Frontend Styles */

.cmc-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    box-sizing: border-box;
}
.cmc-wrap *,
.cmc-wrap *::before,
.cmc-wrap *::after { box-sizing: border-box; }

/* Calendar shell */
.cmc-cal {
    position: relative;
    padding: 1.75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #faf7f2 0%, #f3ebf5 35%, #fdfaf3 65%, #efe5f0 100%);
    color: #3a2d4a;
    border: 0.5px solid rgba(180, 150, 90, 0.25);
    box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.6), 0 4px 24px rgba(74, 53, 96, 0.08);
    overflow: hidden;
}

.cmc-marble {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.18;
    pointer-events: none;
}

/* Header */
.cmc-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.cmc-nav {
    background: rgba(255, 255, 255, 0.7);
    border: 0.5px solid rgba(180, 150, 90, 0.4);
    color: #7a5a2e;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}
.cmc-nav:hover { background: rgba(255, 255, 255, 0.95); }
.cmc-title { text-align: center; }
.cmc-month-label {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #4a3560;
    font-family: Georgia, "Times New Roman", serif;
}
.cmc-sublabel {
    font-size: 10px;
    color: #9a7a4e;
    margin-top: 4px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

/* Weekday row */
.cmc-weekdays {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}
.cmc-weekdays > div {
    text-align: center;
    font-size: 10px;
    color: #9a7a4e;
    letter-spacing: 1.5px;
    padding: 4px 0;
    font-weight: 500;
}

/* Grid */
.cmc-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.cmc-day {
    aspect-ratio: 1;
    border-radius: 8px;
    padding: 6px 4px;
    background: rgba(255, 255, 255, 0.45);
    border: 0.5px solid rgba(180, 150, 90, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
    font-size: 13px;
}
.cmc-day-number {
    color: #7a6a8e;
    font-weight: 400;
    font-family: Georgia, "Times New Roman", serif;
}
.cmc-day-empty {
    background: transparent;
    border: none;
}
.cmc-day-event-ceremony {
    background: linear-gradient(135deg, rgba(220, 205, 235, 0.85), rgba(245, 235, 250, 0.7));
    border: 0.5px solid rgba(157, 126, 196, 0.55);
}
.cmc-day-event-ceremony .cmc-day-number { color: #4a3560; font-weight: 500; }
.cmc-day-event-class {
    background: linear-gradient(135deg, rgba(245, 225, 175, 0.7), rgba(252, 245, 225, 0.7));
    border: 0.5px solid rgba(201, 161, 75, 0.55);
}
.cmc-day-event-class .cmc-day-number { color: #6e5224; font-weight: 500; }
.cmc-day-past {
    background: rgba(220, 215, 225, 0.4);
    border: 0.5px solid rgba(170, 160, 180, 0.3);
    opacity: 0.65;
}
.cmc-day-past .cmc-day-number { color: #9a92a5; }
.cmc-day-no-event-past { opacity: 0.5; }
.cmc-day-clickable { cursor: pointer; }
.cmc-day-clickable:hover { transform: translateY(-2px); }
.cmc-day-dots {
    display: flex;
    gap: 3px;
    justify-content: center;
}
.cmc-day-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}
.cmc-dot-c { background: #9d7ec4; }
.cmc-dot-cl { background: #c9a14b; }
.cmc-dot-p  { background: #aca3b5; }

/* Legend */
.cmc-legend {
    position: relative;
    display: flex;
    gap: 18px;
    margin-top: 1.5rem;
    font-size: 11px;
    color: #6b5a7e;
    flex-wrap: wrap;
}
.cmc-legend > div { display: flex; align-items: center; gap: 6px; }
.cmc-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.cmc-dot-ceremony { background: #9d7ec4; border: 0.5px solid #7a5ca3; }
.cmc-dot-class    { background: #c9a14b; border: 0.5px solid #a48434; }
.cmc-dot-past     { background: #cdc5d4; border: 0.5px solid #aca3b5; }

/* Modal */
.cmc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(58, 45, 74, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 99999;
}
.cmc-modal.cmc-open { display: flex; }
.cmc-modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #faf7f2 0%, #f3ebf5 100%);
    border-radius: 14px;
    border: 0.5px solid rgba(180, 150, 90, 0.4);
    box-shadow: 0 20px 60px rgba(58, 45, 74, 0.4);
    animation: cmc-modal-in 0.3s ease;
}
@keyframes cmc-modal-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.cmc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 0.5px solid rgba(180, 150, 90, 0.4);
    color: #7a5a2e;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 2;
    padding: 0;
}
.cmc-modal-image {
    height: 200px;
    background: #e8dcef;
    border-radius: 14px 14px 0 0;
    background-size: cover;
    background-position: center;
}
.cmc-modal-image-empty {
    background: linear-gradient(135deg, #d8c8e8, #efe2c4);
}
.cmc-modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.cmc-modal-meta {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}
.cmc-modal-title {
    font-size: 22px;
    font-weight: 500;
    margin-top: 6px;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.25;
}
.cmc-modal-date {
    font-size: 12px;
    color: #9a7a4e;
    margin-top: 6px;
    letter-spacing: 0.5px;
}
.cmc-modal-desc {
    font-size: 14px;
    color: #5a4a6e;
    margin-top: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}
.cmc-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 0.5px solid rgba(180, 150, 90, 0.3);
    gap: 12px;
    flex-wrap: wrap;
}
.cmc-modal-seats {
    font-size: 11px;
    color: #9a7a4e;
    letter-spacing: 0.5px;
}
.cmc-modal-link {
    font-size: 13px;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
}
.cmc-modal-link.cmc-walkin {
    background: #4a3560 !important;
    font-size: 12px;
    padding: 10px 16px;
}

/* Mobile */
@media (max-width: 480px) {
    .cmc-cal { padding: 1.25rem; }
    .cmc-month-label { font-size: 16px; }
    .cmc-day { font-size: 12px; }
    .cmc-modal-image { height: 160px; }
    .cmc-modal-title { font-size: 19px; }
}
