/* Chaitanya Events Calendar — Frontend Styles */

.cec-calendar-wrap {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    padding: 24px;
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Header ── */
.cec-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cec-month-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #1a3e6e;
    text-transform: uppercase;
}

.cec-nav-btn {
    background: none;
    border: 1.5px solid #1a3e6e;
    border-radius: 6px;
    color: #1a3e6e;
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.cec-nav-btn:hover {
    background: #1a3e6e;
    color: #fff;
}

/* ── Day-of-week row ── */
.cec-dow-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}
.cec-dow-cell {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 4px 0 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Calendar Grid ── */
.cec-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
}

.cec-day {
    min-height: 80px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 8px 4px;
    position: relative;
    background: #fff;
    cursor: default;
    transition: background 0.12s;
}

.cec-day.cec-empty {
    background: #fafafa;
    cursor: default;
}

.cec-day.cec-has-events {
    cursor: pointer;
}
.cec-day.cec-has-events:hover {
    background: #f0f5fb;
}

.cec-day.cec-today .cec-day-num {
    background: #1a3e6e;
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cec-day-num {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cec-day.cec-selected {
    background: #eef4fb;
}

/* ── Event chips inside day cells ── */
.cec-event-chip {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    border-radius: 3px;
    padding: 2px 5px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.5;
}

/* ── Detail Box ── */
.cec-detail-box {
    background: #1a3e6e;
    color: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 16px;
}

.cec-detail-date-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
}
.cec-detail-date-sup {
    font-size: 13px;
    font-weight: 400;
    vertical-align: super;
    margin-left: 1px;
}
.cec-detail-dow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-top: 2px;
    margin-bottom: 14px;
}

.cec-detail-event {
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.cec-detail-event:first-of-type {
    border-top: none;
    padding-top: 0;
}

.cec-detail-event-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cec-detail-event-title .cec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cec-detail-meta {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 3px;
}
.cec-detail-desc {
    font-size: 13px;
    opacity: 0.80;
    margin-bottom: 8px;
    line-height: 1.5;
}

.cec-learn-more {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.6);
    border-radius: 5px;
    padding: 4px 14px;
    text-decoration: none;
    transition: background 0.15s;
    margin-top: 4px;
}
.cec-learn-more:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 500px) {
    .cec-calendar-wrap { padding: 12px; }
    .cec-day { min-height: 58px; padding: 4px 3px 2px; }
    .cec-event-chip { font-size: 9px; padding: 1px 3px; }
    .cec-day-num { font-size: 12px; }
}

/* ── Month / Year picker ── */
.cec-header-pickers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cec-label-sep {
    font-size: 15px;
    font-weight: 700;
    color: #1a3e6e;
}

.cec-picker-wrap {
    position: relative;
}

.cec-picker-trigger {
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #1a3e6e;
    text-transform: uppercase;
    border-bottom: 2px dashed rgba(26,62,110,0.35);
    padding-bottom: 1px;
    transition: border-color 0.15s;
    user-select: none;
}
.cec-picker-trigger:hover {
    border-bottom-color: #1a3e6e;
}

.cec-picker-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    z-index: 999;
    min-width: 130px;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
}

.cec-picker-popup.cec-popup-open {
    display: block;
}

.cec-popup-item {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.1s;
}
.cec-popup-item:hover {
    background: #f0f5fb;
    color: #1a3e6e;
}
.cec-popup-item-active {
    background: #1a3e6e;
    color: #fff !important;
    border-radius: 4px;
    margin: 0 6px;
    padding: 8px 12px;
}
.cec-popup-item-active:hover {
    background: #15326a;
}
