/* SCHEDULE GRID */
.schedule-container {
    overflow-x: auto;
    background: var(--card-bg);
    padding: 2px;
    border-radius: 12px;
}

.schedule-grid {
    display: grid;
    /* First Col: Time labels (80px), Next 7 Cols: Days (1fr) */
    grid-template-columns: 80px repeat(7, minmax(120px, 1fr));
    gap: 1px;
    background: #333;
    /* Grid lines color */

    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.schedule-grid--fade-out {
    opacity: 0;
    transform: translateY(5px);
}

/* Header Cells */
.schedule-header {
    background: #111;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: var(--text-muted);
    border-bottom: 2px solid var(--primary-color);
}

.schedule-header--today {
    color: var(--primary-color);
    background: rgba(0, 120, 200, 0.12);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 120, 200, 0.2);
}

/* Time Label Cells */
.time-label {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-main);
    letter-spacing: 0.03em;
}

/* --- SLOTS (BEM) --- */

.slot {
    background: #000;
    min-height: 90px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: default;
    transition: all 0.2s;
    position: relative;
    text-align: center;
}

.slot:hover {
    filter: brightness(1.2);
    z-index: 1;
}

/* Slot Content (Text injected via JS) */
.slot__status {
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.slot__price {
    font-size: 0.75rem;
    color: #666;
    font-weight: normal;
}

.slot:hover .slot__price {
    color: #000;
}

/* AVAILABLE */
.slot--available {
    background: #000;
    cursor: pointer;
}

.slot--available:hover {
    background: #111;
}

.slot--available .slot__status {
    color: #555;
    font-size: 1.8rem;
    font-weight: 200;
    transition: color 0.2s;
}

.slot--available:hover {
    background: #0a1a0a;
    border: 1px solid var(--primary-color);
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.06);
}

.slot--available:hover .slot__status,
.slot--available:hover .slot__price {
    display: none;
}

.slot--available:hover::after {
    content: '+ RESERVAR';
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OCCUPIED = LLENO (todas las canchas ocupadas) */
.slot--occupied {
    background: #6b1a1a;
    border-left: 4px solid #e74c3c;
    cursor: default;
}

.slot--occupied[data-action] {
    cursor: pointer;
    /* admin puede abrir */
}

.slot--occupied[data-action]:hover {
    background: #8b2222;
    box-shadow: inset 0 0 12px rgba(231, 76, 60, 0.35);
    filter: brightness(1.1);
}

.slot--occupied .slot__status,
.slot--occupied {
    color: #ffaaaa;
    font-weight: bold;
    letter-spacing: 0.06em;
}

/* Client Info (Admin View) */
.slot__client {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 4px;
    line-height: 1.2;
}

.slot__phone {
    font-size: 0.7rem;
    color: #888;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.slot--occupied:hover .slot__client {
    color: var(--primary-color);
    filter: brightness(1.3);
}

.slot--occupied:hover .slot__phone {
    color: #aaa;
}

/* BLOCKED */
.slot--blocked {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: #444 !important;
    background-image: repeating-linear-gradient(45deg, #151515, #151515 10px, #1a1a1a 10px, #1a1a1a 20px) !important;
    cursor: not-allowed;
}

.slot--blocked .slot__status {
    color: #444;
}

.slot--blocked.slot--admin-view {
    cursor: context-menu;
}

/* PAST */
.slot--past {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
    background: #1a1a1a;
    border-color: #222;
}

.slot--past.slot--admin-view {
    pointer-events: auto;
    cursor: context-menu;
}

/* PAYMENT STATUS (Modifiers on Occupied) */
.slot--paid {
    border: 1px solid #2196F3 !important;
    background: rgba(33, 150, 243, 0.1);
}

.slot--paid .slot__status {
    color: #2196F3 !important;
}

.slot--pending {
    border: 1px dashed #ffae00 !important;
    background: rgba(255, 174, 0, 0.05);
}

.slot--pending .slot__status {
    color: #ffae00 !important;
}

.slot--partial {
    border: 1px dashed #aa00ff !important;
    background: rgba(170, 0, 255, 0.05);
}

.slot--partial .slot__status {
    color: #aa00ff !important;
}

.slot--admin-blocked {
    border: 1px solid #ff4444 !important;
    background: repeating-linear-gradient(45deg, #2a0000, #2a0000 10px, #3a0000 10px, #3a0000 20px) !important;
}

.slot--admin-blocked .slot__status {
    color: #ff4444 !important;
}

/* OWNER TOOLTIP */
.slot__tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.slot:hover .slot__tooltip {
    display: block;
}

.slot__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

/* PROMO SLOTS */
.slot--promo {
    background: rgba(76, 175, 80, 0.05);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.slot--promo:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--success, #4CAF50);
}

.slot__price--promo {
    color: var(--success, #4CAF50) !important;
    font-weight: bold;
}

.promo-badge {
    display: inline-block;
    background: var(--success, #4CAF50);
    color: #000;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 4px;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* OCUPADO PARCIAL (algunas canchas libres) */
.slot--occupied-parcial {
    background: #7a3500 !important;
    /* naranja oscuro */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-weight: bold !important;
    cursor: pointer;
    display: flex !important;
    z-index: 10 !important;
    box-shadow: inset 0 0 10px rgba(230, 126, 34, 0.25);
}

.slot--occupied-parcial:hover {
    background: #9a4500 !important;
    filter: brightness(1.15);
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.5);
}