/* ==== assets/calendar.css ==== */
#aac-calendar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0;
    background: #fff;
    max-width: 1100px;
    margin: 24px auto;
}

.aac-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-direction: column;
}

.aac-nav-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.aac-today-btn,
.aac-prev-btn,
.aac-next-btn {
    font-size: 14px;
    padding: 4px 10px;
    border: 1px solid #d1d5db !important;
    border-radius: 4px;
    background: #ffffff !important;
    color: #000000 !important;
    margin-right: 4px;
    cursor: pointer;
    min-width: 36px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    appearance: none !important;
}

.aac-today-btn:hover,
.aac-prev-btn:hover,
.aac-next-btn:hover {
    background: #f3f4f6 !important;
    color: #111111 !important;
}

.aac-dropdown-container {
    display: flex;
    gap: 8px;
    width: 100%;
}

.aac-dropdown-container select {
    font-size: 14px;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #000;
    min-width: 100px;
}

@media (max-width: 600px) {
    .aac-filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .aac-nav-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
        width: 100%;
        margin-right: 0;
        margin-left: 0;
    }
    .aac-dropdown-container {
        margin-top: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    .aac-dropdown-container select {
        width: 48%;
        min-width: 90px;
    }
}

.aac-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.aac-calendar-dayname {
    text-align: center;
    font-weight: 500;
    padding: 8px 0;
    color: #374151;
    font-size: 15px;
}

.aac-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.aac-calendar-cell {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    min-height: 120px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.aac-calendar-cell.blank {
    background: transparent;
    border: none;
}

.aac-calendar-cell.aac-today-cell {
    border: 2px solid #ef4444 !important;
    z-index: 2;
}

.aac-calendar-date {
    font-weight: bold;
    margin-bottom: 2px;
    text-align: right;
    color: #374151;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    vertical-align: top;
    transition: background 0.2s, color 0.2s;
}
.aac-calendar-date.aac-today-date {
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 2px #be2323;
    width: 28px;
    height: 28px;
    aspect-ratio: 1 / 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aac-slot.taken {
    background: #60A5FA;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    margin: 2px 0;
    padding: 2px 0;
    text-align: center;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}
.aac-slot.aac-more-slot {
    background: #e5e7eb;
    color: #2563eb;
    border: 1px dashed #60A5FA;
    cursor: pointer;
    margin: 2px 0;
    font-size: 12px;
    padding: 2px 0;
    border-radius: 3px;
    text-align: center;
    transition: background 0.1s, color 0.1s;
    max-width: 100%;
    overflow-x: auto;
}
.aac-slot.aac-more-slot:hover,
.aac-slot.aac-more-slot:focus {
    background: #dbeafe;
    color: #1d4ed8;
    outline: none;
}

.aac-modal-overlay {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.aac-modal {
    background: #fff;
    min-width: 280px;
    max-width: 90vw;
    padding: 36px 24px 20px 24px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 32px rgba(0,0,0,0.12);
}
.aac-modal h3 {
    margin: 0 0 12px 0;
    color: #2563eb;
    font-size: 18px;
}
.aac-modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: none;
    background: none;
    font-size: 18px;
    color: #666;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aac-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: #666;
    background: none;
    display: block;
}
.aac-modal-close:hover svg {
    stroke: #ef4444;
}
.aac-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.aac-modal-list li {
    padding: 6px 0;
    font-size: 15px;
    color: #222;
    border-bottom: 1px solid #f3f3f3;
}
.aac-modal-list li:last-child {
    border-bottom: none;
}

/* Spinner overlay and spinner itself */
.aac-spinner-overlay {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.5);
    display: none;
    z-index: 20000;
    align-items: center;
    justify-content: center;
}
.aac-spinner {
    width: 48px;
    height: 48px;
    border: 6px solid #e3e3e3;
    border-top: 6px solid #2563eb;
    border-radius: 50%;
    animation: aac-spin 1s linear infinite;
}
@keyframes aac-spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}
