/* ============================================================
   Time Range Picker — Booking Package Integration
   ============================================================ */

.vtr-range-picker {
    margin: 12px 0 16px;
    padding: 16px;
    background: #f9f9fb;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.vtr-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.vtr-section-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Timeline grid ────────────────────────────────────────── */

.vtr-timeline {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.vtr-timeline--loading {
    background: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 14px;
    text-align: center;
    border-radius: 4px;
}

.vtr-timeline-msg {
    font-size: 12px;
    color: #aaa;
}

.vtr-grid {
    display: flex;
    width: 100%;
}

.vtr-cell {
    flex: 1 1 0;
    min-width: 14px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 3px;
    box-sizing: border-box;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    transition: filter 0.12s;
    cursor: default;
}

.vtr-cell:last-child {
    border-right: none;
}

.vtr-cell--hour {
    border-left: 2px solid rgba(0, 0, 0, 0.15);
}

/* Estado: disponível */
.vtr-cell--free {
    background: #c8e6c9;
}

/* Estado: reservado */
.vtr-cell--booked {
    background: #ffcdd2;
    background-image: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 4px,
        rgba(255, 255, 255, 0.35) 4px,
        rgba(255, 255, 255, 0.35) 6px
    );
}

/* Estado: selecionado pelo usuário */
.vtr-cell--selected {
    background: #90caf9;
    box-shadow: inset 0 -2px 0 0 #1976d2;
}

/* Estado: selecionado mas conflita com reserva existente */
.vtr-cell--conflict {
    background: #ffb74d;
    background-image: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 4px,
        rgba(255, 255, 255, 0.35) 4px,
        rgba(255, 255, 255, 0.35) 6px
    );
    box-shadow: inset 0 -2px 0 0 #e65100;
}

/* Labels dentro da célula */
.vtr-cell-label {
    font-size: 9px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.vtr-cell--booked .vtr-cell-label {
    color: #b71c1c;
}

.vtr-cell--selected .vtr-cell-label {
    color: #0d47a1;
    font-weight: 700;
}

.vtr-cell--conflict .vtr-cell-label {
    color: #bf360c;
    font-weight: 700;
}

/* ── Legenda ──────────────────────────────────────────────── */

.vtr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 6px 0 14px;
}

.vtr-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #666;
}

.vtr-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.vtr-dot--free {
    background: #c8e6c9;
    border: 1px solid #81c784;
}

.vtr-dot--booked {
    background: #ffcdd2;
    border: 1px solid #ef9a9a;
}

.vtr-dot--selected {
    background: #90caf9;
    border: 1px solid #64b5f6;
}

.vtr-dot--conflict {
    background: #ffb74d;
    border: 1px solid #ffa726;
}

/* ── Selects de horário ───────────────────────────────────── */

.vtr-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.vtr-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vtr-field label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vtr-select {
    min-width: 110px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.vtr-select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.vtr-select:disabled {
    background: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
}

.vtr-arrow {
    font-size: 18px;
    color: #999;
    padding-bottom: 8px;
}

/* ── Mensagens de validação ───────────────────────────────── */

.vtr-msg {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
}

.vtr-msg.vtr-msg--loading {
    display: block;
    background: #e2e3e5;
    border: 1px solid #d6d8db;
    color: #383d41;
}

.vtr-msg.vtr-msg--success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.vtr-msg.vtr-msg--error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.vtr-duration {
    margin: 6px 0 0;
    font-size: 12px;
    color: #666;
}

/* ── Botão confirmar ──────────────────────────────────────── */

.vtr-confirm-btn {
    margin-top: 14px;
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.vtr-confirm-btn:hover:not(:disabled) {
    background: #43a047;
}

.vtr-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Badge de término no formulário ──────────────────────── */

.vtr-end-time-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    padding: 6px 12px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    font-size: 13px;
    color: #2e7d32;
}

/* ── Responsivo ───────────────────────────────────────────── */

@media (max-width: 600px) {
    .vtr-row {
        flex-direction: column;
        align-items: stretch;
    }

    .vtr-arrow {
        display: none;
    }

    .vtr-select {
        width: 100%;
    }

    .vtr-cell-label {
        font-size: 8px;
    }
}
