/* =================================================================
   FORMULARIO DE PRESUPUESTO MULTIPASO - STYLES
   ================================================================= */

/* =================================================================
   1. BASE & LAYOUT
   ================================================================= */

.presupuesto-section {
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.presupuesto-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Header */
.presupuesto-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.presupuesto-title {
    font-size: 48px !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin-bottom: 16px !important;
    line-height: 1.2 !important;
}

.presupuesto-subtitle {
    font-size: 18px !important;
    color: #64748b !important;
    max-width: 600px;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

.btn-clear-form {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-clear-form:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-clear-form i {
    font-size: 16px;
}

/* Efecto de brillo en botón vaciar */
.btn-clear-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.btn-clear-form:hover::before {
    left: 100%;
}

/* Asegurar que el texto esté por encima del efecto */
.btn-clear-form > * {
    position: relative;
    z-index: 2;
}

/* =================================================================
   2. PROGRESS INDICATOR
   ================================================================= */

.progress-indicator {
    position: relative;
    background: #ffffff;
    padding: 24px 32px;
    border-radius: 16px;
    margin-top: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 2px solid #000000;
}

.progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 5px;
    width: 14.28%; /* Inicial: 1/7 */
}

.progress-text {
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    margin: 0 0 16px 0;
}

/* Step Indicators (Círculos) */
.step-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.step-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.step-indicator:hover {
    transform: scale(1.2);
}

/* Paso completado */
.step-indicator.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

/* Paso actual */
.step-indicator.active {
    background: #ffffff;
    border: 3px solid #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    width: 16px;
    height: 16px;
}

/* Siguiente paso (gris claro, no clicable todavía) */
.step-indicator.next-step {
    background: #e5e7eb;
    border-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.step-indicator.next-step:hover {
    transform: none;
}

/* Paso bloqueado (oculto) */
.step-indicator.locked {
    background: #f1f5f9;
    border-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.5;
}

.step-indicator.locked:hover {
    transform: none;
}

/* =================================================================
   3. STEP CONTAINER & CONTENT
   ================================================================= */

.step-container {
    margin-bottom: 40px;
    position: relative;
    min-height: 400px;
}

/* Loading placeholder */
.loading-placeholder {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.step-content {
    background: #ffffff;
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-header {
    margin-bottom: 32px;
}

.step-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 12px !important;
}

.step-subtitle {
    font-size: 16px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* =================================================================
   4. SERVICE CARDS (PASO 1)
   ================================================================= */

.service-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.service-card {
    background: #ffffff;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.service-card:hover {
    border-color: #10b981;
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 48px;
    color: #ffffff;
    display: block;
}

.service-icon img {
    width: 64px;
    height: 64px;
    filter: brightness(0) invert(1);
}

.service-card h3 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 12px !important;
}

.service-card p {
    font-size: 15px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* Transport Type Cards (Paso 2) - Más compactas */
.transport-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.transport-card {
    background: #ffffff;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.transport-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.transport-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
}

.transport-card:hover::before {
    opacity: 1;
}

.transport-card.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

.transport-card > * {
    position: relative;
    z-index: 1;
}

.transport-card-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 8px !important;
}

.transport-card-desc {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* Responsive para transport cards */
@media (max-width: 768px) {
    .transport-type-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .transport-card {
        padding: 20px 16px;
    }

    .transport-card-title {
        font-size: 16px !important;
    }

    .transport-card-desc {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .transport-type-cards {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =================================================================
   5. RADIO CARDS (OPCIONES MÚLTIPLES)
   ================================================================= */

.radio-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.radio-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.radio-card:hover {
    border-color: #10b981;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
}

.radio-card.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.radio-card input[type="radio"] {
    display: none; /* Ocultar el radio button */
}

.radio-card-content {
    flex: 1;
}

.radio-card-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin-bottom: 6px !important;
}

.radio-card-description {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* =================================================================
   6. FORM GROUPS & INPUTS
   ================================================================= */

.form-group {
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin-bottom: 10px !important;
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.optional {
    color: #94a3b8;
    font-weight: 400;
    font-size: 13px;
}

.form-input,
.form-textarea {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #000000;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

/* Ocultar spinners en campos numéricos */
.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

.form-input[type="number"] {
    -moz-appearance: textfield !important;
}

/* Asegurar que los spinners estén ocultos en todos los navegadores */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help-text {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    line-height: 1.4;
}

/* Error states */
.input-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.input-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-message::before {
    content: '⚠';
    font-size: 14px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #10b981;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    align-self: center;
}

.checkbox-group label,
.checkbox-label {
    font-size: 15px !important;
    color: #000000 !important;
    cursor: pointer;
    flex: 1;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center;
    display: flex !important;
    align-items: center !important;
}

.checkbox-label a {
    color: #10b981;
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-label a:hover {
    color: #059669;
}

/* =================================================================
   7. NAVIGATION BUTTONS
   ================================================================= */

.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #e5e7eb;
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-prev {
    background: #ffffff;
    color: #000000;
    border: 2px solid #e5e7eb;
}

.btn-prev:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateX(-4px);
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 2px solid transparent;
    margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-submit:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-next:disabled,
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Efecto de brillo en botones */
.btn-prev::before,
.btn-next::before,
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.btn-prev:hover::before,
.btn-next:hover::before,
.btn-submit:hover::before {
    left: 100%;
}

/* Asegurar que el texto esté por encima del efecto */
.btn-prev > *,
.btn-next > *,
.btn-submit > * {
    position: relative;
    z-index: 2;
}

/* =================================================================
   8. TOAST NOTIFICATIONS
   ================================================================= */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 320px;
    max-width: 400px;
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 2px solid #e5e7eb;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.toast.success { border-left: 5px solid #10b981; }
.toast.success .toast-icon { color: #10b981; }

.toast.error { border-left: 5px solid #ef4444; }
.toast.error .toast-icon { color: #ef4444; }

.toast.warning { border-left: 5px solid #f59e0b; }
.toast.warning .toast-icon { color: #f59e0b; }

.toast.info { border-left: 5px solid #3b82f6; }
.toast.info .toast-icon { color: #3b82f6; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 4px !important;
}

.toast-message {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #000000;
}

/* =================================================================
   BOTÓN LIMPIAR FECHAS
   ================================================================= */

.btn-clear-dates {
    background: #64748b;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-dates:hover:not(:disabled) {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-clear-dates:disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-clear-dates i {
    font-size: 14px;
}

/* =================================================================
   9. ANIMATIONS
   ================================================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =================================================================
   10. RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 768px) {
    .presupuesto-section {
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .presupuesto-title {
        font-size: 36px !important;
    }

    .presupuesto-subtitle {
        font-size: 16px !important;
    }

    .progress-indicator {
        padding: 16px 20px;
    }

    .step-indicators {
        gap: 10px;
    }

    .step-indicator {
        width: 12px;
        height: 12px;
    }

    .step-indicator.active {
        width: 14px;
        height: 14px;
    }

    .step-content {
        padding: 32px 24px;
    }

    .step-title {
        font-size: 26px !important;
    }

    .service-cards,
    .radio-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 32px 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }

    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .presupuesto-section {
        padding-top: 90px;
        padding-bottom: 40px;
    }

    .presupuesto-title {
        font-size: 28px !important;
    }

    .step-indicators {
        gap: 8px;
    }

    .step-indicator {
        width: 10px;
        height: 10px;
    }

    .step-indicator.active {
        width: 12px;
        height: 12px;
    }

    .step-content {
        padding: 24px 20px;
    }

    .step-title {
        font-size: 22px !important;
    }

    .service-icon i {
        font-size: 48px;
    }
}