/* css/parking.css */

/* 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; 
}

.btn2 { 
    background-color: #ffc600; 
    color: #000000 !important; /* WCAG compliant contrast */
}

.btn3 { 
    background-color: #9d0727; 
    color: #ffffff !important; 
}

.btn-closed { 
    background-color: #6b7280; 
    color: #ffffff !important; 
}

/* 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; /* Reduced from 600px to be more compact */
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 4px;
    table-layout: fixed;
    display: inline-table; /* Changed to inline-table */
}

.parking-status-table td {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px; /* Slightly reduced font size */
    white-space: nowrap; /* Prevent wrapping */
    width: auto; /* Let content determine width */
    min-width: 140px; /* Ensure minimum width */
}

.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; /* Center the inline tables */
    white-space: nowrap; /* Keep items inline */
}

/* 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;
}

/* 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;
    }
}