/* week-view.css */

/* Container for Week View */
.cec-week-view {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cec-week-view--empty {
    text-align: center;
    padding: 48px 24px 40px;
}

.cec-week-view__empty-state {
    font-size: 1.05rem;
    color: #576480;
    margin: 16px 0 28px;
}

/* Header */
.cec-week-view h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: #333333;
    font-family: 'Arial', sans-serif;
}

/* Week Grid */
.cec-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    overflow: visible;
    padding-bottom: 0;
}

/* Individual Card */
.cec-week-card {
    background-color: #f9fbfd;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

/* Highlight Current Day */
.cec-week-card.today {
    background-color: #e9f2ff;
    border-color: #3a7bd5;
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.15);
}

/* Hover Effect */
.cec-week-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.cec-card-header {
    background: linear-gradient(135deg, #f5f9ff 0%, #eef3fb 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #d5e0ec;
}

.cec-day-name {
    font-size: 1.05em;
    font-weight: 600;
    color: #1f2a44;
    margin-bottom: 4px;
    font-family: 'Arial', sans-serif;
}

.cec-month-day {
    font-size: 0.95em;
    color: #5a6b84;
    font-family: 'Arial', sans-serif;
}

/* Card Body */
.cec-card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cec-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.cec-event-item {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #e3eaf3;
    border-radius: 6px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.cec-event-button,
.cec-event-button:focus,
.cec-event-button:hover,
.cec-event-button:active {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    cursor: pointer;
    font-size: 0.95em;
    color: #205493;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
    text-align: left;
    transition: color 0.2s;
    line-height: 1.4;
    outline: none;
}

.cec-event-button * {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.cec-event-button::before,
.cec-event-button::after,
.cec-event-button *::before,
.cec-event-button *::after {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    content: none !important;
}

.cec-event-button__label {
    display: block;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #1f2a44;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

.cec-event-time {
    font-size: 0.85em;
    color: #576480;
    font-family: 'Arial', sans-serif;
}

/* "No Events" Message */
.cec-no-events {
    text-align: center;
    color: #999999;
    font-style: italic;
    font-family: 'Arial', sans-serif;
}

/* Modal */
.cec-week-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cec-week-modal.is-visible {
    display: flex;
}

.cec-week-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.cec-week-modal__dialog {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 40px;
    width: calc(100% - 48px);
    max-width: 540px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
    z-index: 1;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.cec-week-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: none;
    background: rgba(99, 102, 241, 0.12);
    color: #312e81;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-weight: 600;
}

.cec-week-modal__close:hover,
.cec-week-modal__close:focus {
    background: rgba(99, 102, 241, 0.24);
    transform: translateY(-1px);
    outline: none;
    color: #1e1b4b;
}

.cec-week-modal__header {
    margin-bottom: 24px;
}

.cec-week-modal__eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 10px;
    background: rgba(99, 102, 241, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
}

.cec-week-modal__title {
    font-size: 2rem;
    line-height: 1.2;
    color: #0f172a;
    margin: 0;
    font-weight: 800;
    word-break: break-word;
}

.cec-week-modal__body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.cec-week-modal__meta {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.cec-week-modal__meta-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #e2e8f0;
}

.cec-week-modal__meta-row:first-child {
    border-top: none;
}

.cec-week-modal__meta-row dt {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.98rem;
}

.cec-week-modal__meta-row dd {
    margin: 0;
    font-size: 0.98rem;
    color: #0f172a;
}

.cec-week-modal__description {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    .cec-week-modal__dialog {
        padding: 30px 24px;
    }

    .cec-week-modal__meta-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Show More Button */
.cec-week-view-button {
    text-align: center;
    margin-top: 30px;
}

.cec-show-more-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.2s;
    font-family: 'Arial', sans-serif;
}

.cec-show-more-button:hover {
    background-color: #005177;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .cec-week-view h2 {
        font-size: 1.5em;
    }

    .cec-day-name {
        font-size: 1.1em;
    }

    .cec-month-day {
        font-size: 0.95em;
    }

    .cec-show-more-button {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}
