/**
 * 7-Day Calendar Styles for Single Layout (Enhanced UI/UX)
 * Premium calendar view with improved spacing, colors, and interactions
 */

/* ========================================
   CALENDAR CONTAINER
   ======================================== */

.cwb-calendar-container {
    padding: 0;
}

/* ========================================
   CALENDAR HEADER - ENHANCED
   ======================================== */

.cwb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--cwb-primary-color, #2271b1) 0%, var(--cwb-primary-dark, #135e96) 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.2);
}

.cwb-calendar-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    text-align: center;
    letter-spacing: 0.3px;
}

.cwb-calendar-nav {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.cwb-calendar-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.cwb-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================
   CALENDAR LOADING
   ======================================== */

.cwb-calendar-loading {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.cwb-calendar-loading p {
    margin-top: 16px;
    color: #6c757d;
    font-size: 15px;
    font-weight: 500;
}

/* ========================================
   CALENDAR GRID - ENHANCED LAYOUT
   ======================================== */

.cwb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* ========================================
   DAY COLUMN - PREMIUM DESIGN
   ======================================== */

.cwb-calendar-day {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cwb-calendar-day:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cwb-calendar-day.past {
    opacity: 0.4;
    pointer-events: none;
    background: #f8f9fa;
}

/* Day Header - Enhanced */
.cwb-calendar-day-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 10px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
}

.cwb-calendar-day-name {
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 6px;
}

.cwb-calendar-day-date {
    font-size: 24px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1;
}

/* Today Highlight */
.cwb-calendar-day.today .cwb-calendar-day-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-bottom-color: var(--cwb-primary-color, #2271b1);
}

.cwb-calendar-day.today .cwb-calendar-day-date {
    color: var(--cwb-primary-color, #2271b1);
}

.cwb-calendar-day.today .cwb-calendar-day-name {
    color: var(--cwb-primary-color, #2271b1);
}

/* ========================================
   TIME SLOTS - ENHANCED DESIGN
   ======================================== */

.cwb-calendar-time-slots {
    padding: 12px 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* Custom Scrollbar */
.cwb-calendar-time-slots::-webkit-scrollbar {
    width: 6px;
}

.cwb-calendar-time-slots::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cwb-calendar-time-slots::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.cwb-calendar-time-slots::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Time Slot Button - Premium Style */
.cwb-time-slot {
    display: block;
    width: 100%;
    padding: 12px 10px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
}

.cwb-time-slot:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: var(--cwb-primary-color, #2271b1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.cwb-time-slot.selected {
    background: linear-gradient(135deg, var(--cwb-primary-color, #2271b1) 0%, var(--cwb-primary-dark, #135e96) 100%);
    border-color: var(--cwb-primary-dark, #135e96);
    color: white;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.3);
    transform: scale(1.02);
}

.cwb-time-slot.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 14px;
}

.cwb-time-slot.unavailable {
    background: #f8f9fa;
    color: #cbd5e0;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.5;
    border-color: #e0e0e0;
}

.cwb-time-slot.unavailable:hover {
    background: #f8f9fa;
    border-color: #e0e0e0;
    transform: none;
    box-shadow: none;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.cwb-calendar-day-empty {
    padding: 30px 12px;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.cwb-calendar-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 24px;
    border: 2px dashed #e0e0e0;
}

.cwb-calendar-empty p {
    color: #6c757d;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .cwb-calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .cwb-calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .cwb-calendar-day-header {
        padding: 12px 8px;
    }

    .cwb-calendar-day-name {
        font-size: 10px;
    }

    .cwb-calendar-day-date {
        font-size: 20px;
    }

    .cwb-time-slot {
        padding: 10px 8px;
        font-size: 12px;
    }

    .cwb-calendar-header {
        padding: 16px 20px;
    }

    .cwb-calendar-title {
        font-size: 16px;
    }

    .cwb-calendar-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .cwb-calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cwb-calendar-time-slots {
        max-height: 300px;
    }

    .cwb-calendar-header {
        padding: 14px 16px;
    }

    .cwb-calendar-title {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .cwb-calendar-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DARK THEME SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    .cwb-calendar-day {
        background: #2a2a2a;
        border-color: #444;
    }

    .cwb-calendar-day-header {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
        border-bottom-color: #444;
    }

    .cwb-calendar-day-date,
    .cwb-time-slot {
        color: #e0e0e0;
    }

    .cwb-time-slot {
        background: #333;
        border-color: #555;
    }

    .cwb-time-slot:hover {
        background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    }

    .cwb-calendar-empty,
    .cwb-calendar-loading {
        background: #2a2a2a;
        border-color: #444;
    }

    .cwb-calendar-day.today .cwb-calendar-day-header {
        background: linear-gradient(135deg, #1e3a5f 0%, #2a4a7c 100%);
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cwb-calendar-day {
    animation: fadeIn 0.3s ease-out;
}

.cwb-calendar-day:nth-child(1) {
    animation-delay: 0.05s;
}

.cwb-calendar-day:nth-child(2) {
    animation-delay: 0.1s;
}

.cwb-calendar-day:nth-child(3) {
    animation-delay: 0.15s;
}

.cwb-calendar-day:nth-child(4) {
    animation-delay: 0.2s;
}

.cwb-calendar-day:nth-child(5) {
    animation-delay: 0.25s;
}

.cwb-calendar-day:nth-child(6) {
    animation-delay: 0.3s;
}

.cwb-calendar-day:nth-child(7) {
    animation-delay: 0.35s;
}