/* Padel Court Booking - Frontend Styles v2.0 */

.pcb-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pcb-booking-notice {
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcb-booking-notice .dashicons {
    color: #2271b1;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.pcb-booking-notice p {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.5;
}

.pcb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.pcb-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
}

.pcb-date-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcb-date-selector label {
    font-weight: 600;
    color: #555;
}

.pcb-date-selector input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ========== LEGEND ========== */

.pcb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.pcb-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcb-status-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.pcb-status-box.pcb-available {
    background-color: #28a745;
}

.pcb-status-box.pcb-match {
    background-color: #dc3545;
}

.pcb-status-box.pcb-lesson {
    background-color: #fd7e14;
}

.pcb-status-box.pcb-tournament {
    background-color: #007bff;
}

/* ========== BOOKING GRID ========== */

.pcb-booking-grid {
    overflow-x: auto;
}

.pcb-booking-grid::-webkit-scrollbar {
    height: 8px;
}

.pcb-booking-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pcb-booking-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.pcb-booking-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.table.table-striped {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table.table-striped thead th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 14px;
}

.table.table-striped th,
.table.table-striped td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.table.table-striped td {
    font-size: 14px;
}

/* ========== TIME SLOT COLUMN ========== */

.pcb-time-slot {
    background-color: #34495e;
    color: white;
    width: 100px;
    height: 60px;
    cursor: default;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    position: sticky;
    left: 0;
    z-index: 5;
    white-space: nowrap;
    padding: 12px !important;
    text-align: center;
}

/* ========== COURT CELLS ========== */

.pcb-court-cell {
    width: 120px;
    min-width: 120px;
    height: 60px;
    cursor: default;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    vertical-align: middle;
}

.pcb-court-cell.available {
    background-color: #d4edda;
    color: #155724;
}

/* Match cells - RED */
.pcb-court-cell.pcb-type-match {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Lesson cells - ORANGE */
.pcb-court-cell.pcb-type-lesson {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #fd7e14;
}

/* Tournament cells - BLUE with name visible */
.pcb-court-cell.pcb-type-tournament {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #007bff;
    font-size: 12px;
    padding: 8px;
    line-height: 1.3;
}

.pcb-court-cell.occupied:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ========== LOADING ========== */

.pcb-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* ========== FOOTER ========== */

.pcb-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.pcb-footer p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.pcb-footer a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.pcb-footer a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 768px) {
    .pcb-container {
        padding: 10px;
        margin: 10px 5px;
        box-shadow: none;
    }
    
    .pcb-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding-bottom: 10px;
    }
    
    .pcb-header h2 {
        font-size: 22px;
        text-align: center;
    }
    
    .pcb-header-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .pcb-digital-clock-frontend {
        font-size: 32px !important;
        padding: 15px !important;
        text-align: center;
        width: 100%;
        border-radius: 8px;
    }
    
    .pcb-date-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .pcb-date-selector label {
        font-size: 16px;
        font-weight: 600;
    }
    
    .pcb-date-selector input[type="date"] {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border-radius: 6px;
    }
    
    .pcb-legend {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        padding: 12px;
    }
    
    .pcb-legend-item {
        font-size: 14px;
    }
    
    .pcb-booking-notice {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .pcb-booking-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
        /* Smooth scrolling */
        scroll-behavior: smooth;
        /* Better scrollbar on mobile */
        scrollbar-width: thin;
        scrollbar-color: #2271b1 #f0f0f0;
    }
    
    /* Webkit scrollbar styling */
    .pcb-booking-grid::-webkit-scrollbar {
        height: 8px;
    }
    
    .pcb-booking-grid::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 4px;
    }
    
    .pcb-booking-grid::-webkit-scrollbar-thumb {
        background: #2271b1;
        border-radius: 4px;
    }
    
    .table.table-striped {
        min-width: 600px;
        font-size: 14px;
    }
    
    .table.table-striped th,
    .table.table-striped td {
        padding: 8px 6px;
    }
    
    .table.table-striped th {
        font-size: 15px;
        padding: 12px 8px;
    }
    
    .table.table-striped td {
        font-size: 13px;
    }
    
    /* TIME COLUMN - Bigger and more readable */
    .pcb-time-slot {
        font-size: 16px !important;
        font-weight: 700;
        padding: 12px 6px !important;
        min-width: 60px;
        width: 60px;
        height: 55px;
        /* Shadow for better visibility */
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* COURT CELLS - Touch friendly */
    .pcb-court-cell {
        width: 110px;
        min-width: 110px;
        height: 55px;
        font-size: 13px;
        padding: 8px;
        line-height: 1.3;
    }
    
    .pcb-court-cell.pcb-type-tournament {
        font-size: 11px;
        padding: 6px;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .pcb-container {
        padding: 8px;
        margin: 5px 2px;
        border-radius: 8px;
    }
    
    .pcb-header h2 {
        font-size: 20px;
    }
    
    .pcb-digital-clock-frontend {
        font-size: 28px !important;
        padding: 12px !important;
    }
    
    .pcb-booking-notice {
        padding: 10px 12px;
        font-size: 14px;
        flex-direction: column;
        text-align: center;
    }
    
    .pcb-booking-notice .dashicons {
        margin-bottom: 5px;
    }
    
    .pcb-status-box {
        width: 22px;
        height: 22px;
    }
    
    .pcb-legend-item {
        font-size: 12px;
    }
    
    .pcb-booking-grid {
        margin: 0 -8px;
        padding: 0 8px;
    }
    
    .table.table-striped {
        min-width: 500px;
        font-size: 13px;
    }
    
    .table.table-striped th,
    .table.table-striped td {
        padding: 6px 4px;
    }
    
    .table.table-striped th {
        font-size: 14px;
        padding: 10px 6px;
    }
    
    /* TIME COLUMN - Big and readable on small screens */
    .pcb-time-slot {
        font-size: 15px !important;
        font-weight: 700;
        padding: 10px 4px !important;
        min-width: 55px;
        width: 55px;
        height: 50px;
    }
    
    /* COURT CELLS - Adequate size for touch */
    .pcb-court-cell {
        width: 95px;
        min-width: 95px;
        height: 50px;
        font-size: 12px;
        padding: 6px;
    }
    
    .pcb-court-cell.pcb-type-tournament {
        font-size: 10px;
        padding: 4px;
    }
    
    .pcb-loading {
        padding: 30px 10px;
        font-size: 16px;
    }
    
    /* Footer */
    .pcb-container footer {
        font-size: 11px;
        padding: 10px 5px;
    }
}
