/* ═══════════════ HOURLY BOOKING — AVAILABILITY VIEWER ═══════════════ */

#hb-availability-viewer {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-primary: #6366f1;
    --color-text: #1a202c;
    --color-text-light: #718096;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-neutral: #f1f5f9;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--color-text);
    max-width: 1000px;
    margin: 40px auto;
}

.hb-avail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.hb-avail-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
}

.hb-avail-info p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 15px;
}

.hb-avail-btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.hb-avail-btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.hb-avail-calendar-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.hb-avail-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hb-avail-calendar-nav button {
    background: var(--color-neutral);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.hb-avail-calendar-nav button:hover {
    background: #e2e8f0;
}

.hb-avail-calendar-nav h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

/* Shareable calendar table styles (simplified from customer portal) */
.hb-calendar-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.calendar-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
}

.calendar-table th {
    background: var(--color-neutral);
    padding: 10px;
    border: 1px solid var(--color-border);
    font-weight: 600;
    text-align: center;
}

.calendar-table td {
    border: 1px solid var(--color-border);
    text-align: center;
    height: 30px;
    padding: 0;
    cursor: default;
}

.calendar-table td.available { background: #fff; }
.calendar-table td.booked { background: #e0e7ff; color: #4338ca; }
.calendar-table td.locked { background: #fef2f2; }
.calendar-table td.closed { background: #f8fafc; color: #cbd5e1; }
.calendar-table td.unavailable { background: #cbd5e1; color: transparent; }
.calendar-table td.buffer-slot { background: #fef3c7; color: transparent; }

.calendar-table td:first-child {
    background: var(--color-neutral);
    font-weight: 600;
    width: 60px;
    color: var(--color-text-light);
}

.hb-avail-legend {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--color-text-light);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
}

.dot-available { background: #fff; border: 1px solid #cbd5e1; }
.dot-booked { background: #e0e7ff; }
.dot-closed { background: #f8fafc; border: 1px solid #eee; }

.hb-avail-loading {
    padding: 60px;
    text-align: center;
}

.hb-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .hb-avail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .hb-avail-btn-primary {
        width: 100%;
        text-align: center;
    }
}
