/* =========================================================
   Deja Vu Reservas — Frontend CSS
   ========================================================= */

.dj-reservas-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Encabezado */
.dj-reservas-header {
    text-align: center;
    margin-bottom: 40px;
}

.dj-reservas-header h1 {
    font-size: 2rem;
    color: #e6e6e6;
    margin-bottom: 12px;
}

.dj-reservas-header p {
    color: #aaa;
    font-size: 1rem;
}

/* Pasos */
.dj-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
}

.dj-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 13px;
}

.dj-step.active {
    color: #ff5a5f;
}

.dj-step.done {
    color: #4caf50;
}

.dj-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.dj-step-sep {
    width: 32px;
    height: 2px;
    background: #333;
    margin: 0 6px;
    flex-shrink: 0;
    align-self: center;
}

/* Panel principal */
.dj-panel {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 32px;
}

/* Calendario de días */
.dj-calendar-label {
    color: #e6e6e6;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.dj-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dj-week-nav span {
    color: #aaa;
    font-size: 14px;
}

.dj-week-btn {
    background: none;
    border: 1px solid #333;
    color: #e6e6e6;
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.dj-week-btn:hover:not(:disabled) {
    border-color: #ff5a5f;
    color: #ff5a5f;
}

.dj-week-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dj-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 28px;
}

.dj-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: #111;
    min-height: 52px;
}

.dj-day .dj-day-name {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dj-day .dj-day-num {
    font-size: 17px;
    font-weight: 600;
    color: #e6e6e6;
    line-height: 1.2;
}

.dj-day:hover:not(.disabled) {
    border-color: #ff5a5f;
    background: #1f1010;
}

.dj-day.selected {
    border-color: #ff5a5f;
    background: #2a0d0d;
}

.dj-day.selected .dj-day-num {
    color: #ff5a5f;
}

.dj-day.disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.dj-day.today .dj-day-num {
    color: #ff5a5f;
}

/* Slots de hora */
.dj-slots-label {
    color: #e6e6e6;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.dj-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    min-height: 44px;
}

.dj-slot {
    padding: 9px 18px;
    background: #111;
    border: 2px solid #333;
    border-radius: 6px;
    color: #e6e6e6;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.dj-slot:hover {
    border-color: #ff5a5f;
    background: #1f1010;
}

.dj-slot.selected {
    border-color: #ff5a5f;
    background: #2a0d0d;
    color: #ff5a5f;
    font-weight: 600;
}

.dj-slots-loading {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.dj-slots-empty {
    color: #666;
    font-size: 14px;
}

/* Formulario */
.dj-form {
    display: none;
}

.dj-form.visible {
    display: block;
}

.dj-form-group {
    margin-bottom: 20px;
}

.dj-form-group label {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dj-form-group input[type="text"],
.dj-form-group input[type="email"],
.dj-form-group input[type="tel"],
.dj-form-group textarea {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e6e6e6;
    font-size: 15px;
    padding: 12px 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.dj-form-group input:focus,
.dj-form-group textarea:focus {
    outline: none;
    border-color: #ff5a5f;
}

.dj-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.dj-form-group input.error {
    border-color: #e74c3c;
}

.dj-field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.dj-field-error.visible {
    display: block;
}

/* RGPD */
.dj-rgpd-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.5;
}

.dj-rgpd-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #ff5a5f;
}

.dj-rgpd-label a {
    color: #ff5a5f;
    text-decoration: none;
}

/* Resumen selección */
.dj-selection-summary {
    background: #111;
    border: 1px solid #2d2d2d;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 24px;
    color: #e6e6e6;
    font-size: 14px;
}

.dj-selection-summary strong {
    color: #ff5a5f;
}

/* Botón CTA */
.dj-btn-reservar {
    width: 100%;
    background: #ff5a5f;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dj-btn-reservar:hover:not(:disabled) {
    background: #e04e53;
    transform: translateY(-1px);
}

.dj-btn-reservar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dj-btn-reservar .dj-spinner {
    display: none;
}

.dj-btn-reservar.loading .dj-spinner {
    display: inline;
}

.dj-btn-reservar.loading .dj-btn-text {
    opacity: 0.7;
}

/* Error general */
.dj-error-msg {
    background: #2d0a0a;
    border: 1px solid #c0392b;
    border-radius: 6px;
    color: #e74c3c;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.dj-error-msg.visible {
    display: block;
}

/* Pantalla de éxito */
.dj-success {
    text-align: center;
    display: none;
    padding: 20px 0;
}

.dj-success.visible {
    display: block;
}

.dj-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.dj-success h2 {
    color: #e6e6e6;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.dj-success p {
    color: #aaa;
    font-size: 15px;
    margin-bottom: 24px;
}

.dj-success-details {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 18px 24px;
    text-align: left;
    margin: 0 auto 24px;
    max-width: 360px;
    color: #e6e6e6;
    font-size: 14px;
}

.dj-success-details .dj-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #2a2a2a;
}

.dj-success-details .dj-detail-row:last-child {
    border-bottom: none;
}

.dj-success-details .dj-detail-label {
    color: #666;
}

.dj-btn-gcal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4285F4;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
    margin-bottom: 16px;
}

.dj-btn-gcal:hover {
    background: #3367d6;
    color: #fff;
}

.dj-btn-nueva {
    display: inline-block;
    color: #ff5a5f;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #ff5a5f;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    transition: all 0.2s;
}

.dj-btn-nueva:hover {
    background: #ff5a5f;
    color: #fff;
}

/* Responsivo */
@media (max-width: 480px) {
    .dj-panel {
        padding: 20px 16px;
    }

    .dj-days-grid {
        gap: 4px;
    }

    .dj-day {
        min-height: 44px;
    }

    .dj-day .dj-day-name {
        font-size: 9px;
    }

    .dj-day .dj-day-num {
        font-size: 15px;
    }

    .dj-steps {
        gap: 0;
    }

    .dj-step {
        font-size: 11px;
    }
}
