/* ============================================================
   Autoescuela Reservas — Public Form (Modern Design)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Wrapper ── */
.ae-reserva-wizard {
    max-width: 600px;
    margin: 2em 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ae-reserva-wizard svg {
    max-width: 100%;
    max-height: 100%;
}

/* ── Step Indicator ── */
.ae-wizard-steps {
    display: flex;
    align-items: center;
    margin-bottom: 36px;
}

.ae-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    cursor: default;
}

.ae-step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all .3s ease;
}

.ae-step-text {
    font-size: .78rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    transition: color .3s ease;
    white-space: nowrap;
}

.ae-step.active .ae-step-icon {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
}

.ae-step.active .ae-step-text {
    color: #4f46e5;
}

.ae-step.done .ae-step-icon {
    background: #10b981;
    border-color: transparent;
    color: #fff;
}

.ae-step.done .ae-step-text {
    color: #059669;
}

.ae-step-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 8px;
    margin-bottom: 22px;
    transition: background .3s ease;
}

.ae-step-connector.done {
    background: linear-gradient(90deg, #10b981, #3b82f6);
}

/* ── Step Content Card ── */
.ae-wizard-content {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    padding: 32px;
}

/* ── Step Header ── */
.ae-step-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.ae-step-header h3 {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.02em;
}

.ae-step-header p {
    margin: 0;
    font-size: .9rem;
    color: #64748b;
}

/* ── Field Groups ── */
.ae-field-group {
    margin-bottom: 20px;
}

.ae-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ae-field-label svg {
    flex-shrink: 0;
    opacity: .7;
}

.ae-required {
    color: #ef4444;
    font-size: .9em;
}

/* ── Inputs ── */
.ae-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: .95rem;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ae-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}

.ae-input::placeholder {
    color: #cbd5e1;
}

.ae-input:read-only {
    cursor: pointer;
}

/* ── Select with custom arrow ── */
.ae-select-wrapper {
    position: relative;
    display: block;
}

.ae-select {
    padding-right: 44px !important;
    cursor: pointer;
}

.ae-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    color: #94a3b8;
    pointer-events: none;
    display: block;
    flex-shrink: 0;
}

/* ── Calendar icon ── */
.ae-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ae-input-date {
    padding-right: 44px !important;
    cursor: pointer;
}

.ae-icon-calendar {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

/* ── Error ── */
.ae-error {
    display: block;
    color: #ef4444;
    font-size: .82rem;
    font-weight: 500;
    margin-top: 6px;
    padding-left: 4px;
}

/* ── Slot grid ── */
.ae-slots-header {
    margin-top: 8px;
}

.ae-horarios-label {
    margin-bottom: 14px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: .82rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ae-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.ae-slot-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: inherit;
}

.ae-slot-btn:hover {
    border-color: #a5b4fc;
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,.1);
}

.ae-slot-btn.selected {
    background: linear-gradient(135deg, #eff6ff, #f0f4ff);
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.ae-slot-btn strong {
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.01em;
}

.ae-slot-btn.selected strong {
    color: #4f46e5;
}

.ae-slot-btn span {
    font-size: .78rem;
    color: #94a3b8;
    font-weight: 500;
}

.ae-no-slots {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 28px;
    font-size: .9rem;
}

/* ── Loading ── */
.ae-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6366f1;
    font-size: .88rem;
    font-weight: 500;
    padding: 12px 0;
}

.ae-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #e0e7ff;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ae-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes ae-spin {
    to { transform: rotate(360deg); }
}

/* ── Buttons ── */
.ae-step-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.ae-step-actions--between {
    justify-content: space-between;
}

.ae-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    line-height: 1;
}

.ae-btn-next,
.ae-btn-submit {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}

.ae-btn-next:hover,
.ae-btn-submit:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, .4);
}

.ae-btn-next:disabled,
.ae-btn-submit:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.ae-btn-prev {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}

.ae-btn-prev:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* ── Summary / Resumen ── */
.ae-resumen {
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 8px;
}

.ae-resumen-row {
    display: grid;
    grid-template-columns: 28px 130px 1fr;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s ease;
}

.ae-resumen-row:last-child {
    border-bottom: none;
}

.ae-resumen-row:hover {
    background: #f0f4ff;
}

.ae-resumen-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.ae-resumen-key {
    font-size: .82rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ae-resumen-val {
    font-size: .92rem;
    font-weight: 600;
    color: #1e293b;
}

/* ── Result screen ── */
.ae-wizard-result {
    padding: 32px 24px;
    border-radius: 20px;
    margin-top: 16px;
    text-align: center;
}

.ae-wizard-result.success {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #86efac;
}

.ae-wizard-result.success h3 {
    color: #166534;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.ae-wizard-result.success p {
    color: #15803d;
}

.ae-wizard-result.error {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px solid #fca5a5;
}

.ae-wizard-result.error h3 {
    color: #991b1b;
}

.ae-wizard-result.error p {
    color: #b91c1c;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .ae-wizard-content {
        padding: 22px 18px;
    }

    .ae-slots-grid {
        grid-template-columns: 1fr;
    }

    .ae-step-text {
        font-size: .7rem;
    }

    .ae-step-icon {
        width: 38px;
        height: 38px;
    }
}
