/* css/parking.css - v2.1.0 */

/* ===========================
   Status buttons and indicators
   =========================== */
.btn1, .btn2, .btn3, .btn-closed {
    min-width: 100px;
    padding: 8px 16px;
    text-align: center;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn1 { 
    background-color: #20aa00; 
    color: #ffffff !important; 
}

/* WCAG 2.1 AA fix: #ffc600 with white text fails contrast.
   Using dark text (#000000) on yellow passes at 15.3:1 */
.btn2 { 
    background-color: #ffc600; 
    color: #000000 !important;
}

.btn3 { 
    background-color: #9d0727; 
    color: #ffffff !important; 
}

.btn-closed { 
    background-color: #6b7280; 
    color: #ffffff !important; 
}

/* ===========================
   Focus styles for keyboard nav (WCAG 2.4.7)
   =========================== */
.btn1:focus-visible, .btn2:focus-visible, 
.btn3:focus-visible, .btn-closed:focus-visible,
.status-pill:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* ===========================
   Main parking table styles
   =========================== */
.parking-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
}

.parking-table thead th {
    background: #0054A4;
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    text-align: left;
}

.parking-table td {
    padding: 15px 20px;
    font-weight: 500;
    font-size: 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.parking-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ===========================
   Mini status display (homepage)
   =========================== */
.parking-status-table {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 4px;
    table-layout: fixed;
    display: inline-table;
}

.parking-status-table td {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    width: auto;
    min-width: 140px;
}

.parking-status-table span {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.parking-status-table strong {
    font-weight: 700;
    margin-left: 4px;
}

/* ===========================
   Status pills
   =========================== */
.status-pill {
    min-width: 100px;
    padding: 8px 16px;
    text-align: center;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
}

.parking-status {
    text-align: center;
    white-space: nowrap;
}

/* ===========================
   Loading indicator
   =========================== */
.loading-indicator {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    justify-content: center;
    align-items: center;
}

.loading .loading-indicator {
    display: flex;
}

/* ===========================
   Accessibility
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===========================
   Icons
   =========================== */
.lot-icon {
    margin-right: 8px;
    vertical-align: middle;
}

/* ===========================
   Utilities
   =========================== */
.text-black {
    color: #000000 !important;
}

/* Last updated text */
.last-updated {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
}

/* ===========================
   Mobile Responsiveness
   =========================== */
@media (max-width: 768px) {
    .parking-table td,
    .parking-table th {
        padding: 10px;
        font-size: 14px;
    }
    
    .parking-status-table td {
        padding: 8px;
    }
    
    .parking-status-table span {
        font-size: 14px;
    }
    
    .btn1, .btn2, .btn3, .btn-closed,
    .status-pill {
        min-width: 90px;
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* ===========================
   Print styles
   =========================== */
@media print {
    .parking-status-table,
    .parking-table {
        page-break-inside: avoid;
    }
    
    .btn1, .btn2, .btn3, .btn-closed,
    .status-pill {
        border: 1px solid #000;
        color: #000 !important;
        background: none !important;
    }
}
