/**
 * HWC Calendar Styles
 * Brand Colors:
 * - Harlem Gold: #E8A838
 * - Warm Amber: #D4912E
 * - Charcoal: #2D2D2D
 * - Forest Green: #4A7C59
 * - Off-White: #FAF8F5
 */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Playfair+Display:wght@600;700&display=swap');

/* Container */
.hwc-calendar {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}

.hwc-calendar *,
.hwc-calendar *::before,
.hwc-calendar *::after {
    box-sizing: border-box;
}

/* Header */
.hwc-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: #FAF8F5;
    border-bottom: 1px solid #E5E5E5;
    flex-wrap: wrap;
    gap: 16px;
}

.hwc-calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hwc-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #E5E5E5;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #2D2D2D;
    transition: all 0.2s ease;
}

.hwc-nav-btn:hover {
    background: #E8A838;
    border-color: #E8A838;
    color: #fff;
}

.hwc-current-range {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: #2D2D2D;
    min-width: 180px;
    text-align: center;
}

/* View Toggle */
.hwc-view-toggle {
    display: flex;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #E5E5E5;
}

.hwc-view-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #757575;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.hwc-view-btn:hover {
    color: #2D2D2D;
}

.hwc-view-btn.active {
    background: #E8A838;
    color: #fff;
}

/* Calendar Body */
.hwc-calendar-body {
    padding: 24px;
    min-height: 400px;
}

/* Views */
.hwc-view {
    display: none;
}

.hwc-view.active {
    display: block;
}

/* ==================== WEEK VIEW ==================== */
.hwc-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.hwc-day {
    background: #FAF8F5;
    border-radius: 8px;
    min-height: 140px;
    padding: 12px;
}

.hwc-day.hwc-today {
    background: #FFF8E8;
    border: 2px solid #E8A838;
}

.hwc-day-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5E5E5;
}

.hwc-day-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
}

.hwc-day-date {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #2D2D2D;
}

.hwc-today .hwc-day-date {
    color: #E8A838;
}

.hwc-day-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Compact Event Card (Week View) */
.hwc-event-compact {
    background: #fff;
    border-radius: 6px;
    padding: 8px;
    border-left: 3px solid #E8A838;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hwc-event-compact:hover {
    transform: translateX(2px);
}

.hwc-event-time-compact {
    font-weight: 600;
    color: #E8A838;
    font-size: 11px;
    margin-bottom: 2px;
}

.hwc-event-title-compact {
    color: #2D2D2D;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.hwc-event-compact .hwc-event-badge {
    font-size: 9px;
    padding: 2px 6px;
}

/* ==================== MONTH VIEW ==================== */
.hwc-month-view {
    overflow-x: auto;
}

.hwc-month-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    margin-bottom: 6px;
}

.hwc-month-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    padding: 6px 0;
}

.hwc-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.hwc-month-day {
    background: #FAF8F5;
    border-radius: 6px;
    min-height: 90px;
    padding: 6px;
    overflow: hidden;
}

.hwc-month-day.hwc-today {
    background: #FFF8E8;
    border: 2px solid #E8A838;
}

.hwc-month-day.hwc-other-month {
    background: #f5f5f5;
    opacity: 0.6;
}

.hwc-month-day-number {
    font-size: 13px;
    font-weight: 600;
    color: #2D2D2D;
    margin-bottom: 4px;
}

.hwc-today .hwc-month-day-number {
    color: #E8A838;
}

.hwc-month-day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hwc-month-event {
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hwc-month-event.hwc-badge-online {
    background: rgba(74, 124, 89, 0.15);
    color: #4A7C59;
}

.hwc-month-event.hwc-badge-inperson {
    background: rgba(232, 168, 56, 0.15);
    color: #D4912E;
}

.hwc-month-event-time {
    font-weight: 600;
    margin-right: 4px;
}

.hwc-month-event-title {
    font-weight: 400;
}

.hwc-month-more {
    font-size: 10px;
    color: #E8A838;
    font-weight: 600;
    cursor: pointer;
}

/* ==================== LIST VIEW ==================== */
.hwc-event-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hwc-list-date-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 0 8px;
    border-bottom: 2px solid #E8A838;
    margin-top: 16px;
}

.hwc-list-date-header:first-child {
    margin-top: 0;
}

.hwc-list-day {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: #2D2D2D;
}

.hwc-list-date {
    font-size: 14px;
    color: #757575;
}

/* Full Event Card (List View) */
.hwc-event-full {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: #FAF8F5;
    border-radius: 8px;
    border-left: 4px solid #E8A838;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hwc-event-full:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hwc-event-time {
    flex-shrink: 0;
    min-width: 90px;
    text-align: right;
}

.hwc-time-start {
    font-size: 16px;
    font-weight: 600;
    color: #2D2D2D;
}

.hwc-time-end {
    font-size: 13px;
    color: #757575;
}

.hwc-event-details {
    flex: 1;
    min-width: 0;
}

.hwc-event-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2D2D2D;
    margin: 0 0 6px 0;
}

.hwc-event-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hwc-event-location {
    font-size: 13px;
    color: #757575;
}

/* Event Badges */
.hwc-event-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hwc-badge-online {
    background: rgba(74, 124, 89, 0.15);
    color: #4A7C59;
}

.hwc-badge-inperson {
    background: rgba(232, 168, 56, 0.15);
    color: #D4912E;
}

/* Event Actions */
.hwc-event-actions {
    flex-shrink: 0;
}

.hwc-add-calendar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #E8A838;
    border-radius: 6px;
    color: #E8A838;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.hwc-add-calendar:hover {
    background: #E8A838;
    color: #fff;
}

.hwc-add-calendar svg {
    flex-shrink: 0;
}

/* No Events */
.hwc-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #757575;
}

.hwc-no-events p {
    font-size: 16px;
    margin: 0;
}

/* Footer */
.hwc-calendar-footer {
    padding: 16px 32px;
    background: #FAF8F5;
    border-top: 1px solid #E5E5E5;
    text-align: center;
}

.hwc-calendar-note {
    font-size: 12px;
    color: #757575;
    margin: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .hwc-week {
        grid-template-columns: repeat(4, 1fr);
    }

    .hwc-week .hwc-day:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .hwc-calendar-header {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .hwc-calendar-nav {
        justify-content: center;
    }

    .hwc-view-toggle {
        justify-content: center;
    }

    .hwc-current-range {
        font-size: 20px;
    }

    .hwc-calendar-body {
        padding: 16px;
    }

    /* Week view becomes list on mobile */
    .hwc-week {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .hwc-week .hwc-day {
        display: block !important;
        min-height: auto;
    }

    .hwc-day-header {
        display: flex;
        align-items: baseline;
        gap: 8px;
        text-align: left;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 8px;
    }

    .hwc-day-name {
        font-size: 14px;
    }

    .hwc-day-date {
        font-size: 16px;
    }

    /* Month view */
    .hwc-month-day {
        min-height: 60px;
        padding: 4px;
    }

    .hwc-month-day-number {
        font-size: 12px;
    }

    .hwc-month-event {
        font-size: 8px;
        padding: 2px 4px;
    }

    .hwc-month-event-title {
        display: none;
    }

    /* List view */
    .hwc-event-full {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .hwc-event-time {
        text-align: left;
        display: flex;
        gap: 4px;
        align-items: baseline;
    }

    .hwc-event-actions {
        width: 100%;
    }

    .hwc-add-calendar {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hwc-month-header,
    .hwc-month-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .hwc-month-day-name {
        font-size: 10px;
    }

    .hwc-view-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
