/* Estilos para el nuevo flujo de tasación */

.tasacion-section {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    background: var(--color-neutral-50);
}

.tasacion-section .section-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Barra de progreso */
.progress-bar-container {
    margin-bottom: 3rem;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-neutral-200);
    color: var(--color-neutral-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 3px solid var(--color-neutral-200);
}

.progress-step.active .step-number {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb, 30, 136, 229), 0.1);
}

.progress-step.completed .step-number {
    background: var(--color-primary, #4595da);
    color: white;
    border-color: var(--color-primary, #4595da);
}

.step-label {
    font-size: 0.875rem;
    color: var(--color-neutral-600);
    text-align: center;
    font-weight: 500;
    max-width: 120px;
}

.progress-step.active .step-label {
    color: var(--color-primary);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--color-primary, #4595da);
}

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--color-neutral-200);
    margin: 0 1rem;
    position: relative;
    top: -24px;
    z-index: 1;
    transition: background 0.3s ease;
}

.progress-line.completed {
    background: var(--color-primary, #4595da);
}

/* Contenido del formulario */
.tasacion-content {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tasacion-form {
    max-width: 100%;
}

.step-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 1rem;
    color: var(--color-neutral-600);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-neutral-100);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Contenedor de Turnstile en paso 3 - centrado y ancho completo */
.turnstile-container-step3 {
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.turnstile-container-step3 .cf-turnstile {
    width: 100%;
    display: flex;
    justify-content: center;
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-neutral-700);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.input-with-tooltip {
    position: relative;
}

.tooltip-trigger {
    position: absolute;
    pointer-events: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.tooltip-trigger::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-8px);
    background: var(--color-neutral-900);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 400;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    word-wrap: break-word;
    text-align: center;
}

.tooltip-trigger::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: var(--color-neutral-900);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.tooltip-trigger.show-tooltip::before {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-trigger.show-tooltip::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-neutral-200);
    border-radius: 8px;
    background: white;
    color: var(--color-neutral-900);
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Ocultar spinners en inputs de tipo number */
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-input[type="number"] {
    -moz-appearance: textfield;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-neutral-200);
    border-radius: 8px;
    background: white;
    color: var(--color-neutral-900);
    transition: all 0.2s ease;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form-select:hover {
    border-color: var(--color-neutral-300);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 30, 136, 229), 0.1);
}

.form-input::placeholder {
    color: var(--color-neutral-400);
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-neutral-500);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group-half {
    margin-bottom: 0;
}

.form-group-third {
    margin-bottom: 0;
}

.form-row.form-row-three {
    grid-template-columns: repeat(3, 1fr);
}

/* Mapa */
.tasacion-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--color-neutral-200);
    margin-bottom: 1rem;
}

.map-instruction {
    font-size: 0.875rem;
    color: var(--color-neutral-600);
    margin-bottom: 0.75rem;
}

.map-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-primary-light, #E3F2FD);
    color: var(--color-primary-dark, #1565C0);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

.map-status svg {
    flex-shrink: 0;
}

/* Toggle switch - Estilo Bootstrap */
.toggle-group {
    margin-bottom: 1.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-neutral-700);
    margin-bottom: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin: 0;
}

.toggle-switch input[type="radio"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Toggle estilo botones compactos */
.toggle-buttons {
    display: inline-flex;
    background: var(--color-neutral-200);
    border-radius: 6px;
    gap: 2px;
    margin: 0 auto;
    justify-content: center;
}

.toggle-buttons input[type="radio"] {
    display: none;
}

.toggle-btn {
    width: 150px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-neutral-700);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-buttons input[type="radio"]:checked + .toggle-btn {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-buttons input[type="radio"]:not(:checked) + .toggle-btn:hover {
    background: var(--color-neutral-300);
}

.form-group .toggle-buttons {
    display: flex;
    width: 100%;
    justify-content: center;
}

.amenities-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    color: var(--color-neutral-700);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Sistema de estrellas (rating) - Layout matriz */
.star-rating-matrix-container {
    margin-bottom: 2rem;
}

.star-rating-matrix-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 0.75rem;
    align-items: start;
}

.star-rating-matrix-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-neutral-700);
    text-align: left;
}

.star-rating-labels-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    gap: 0;
    align-items: start;
    padding: 0;
    margin: 0;
}

.star-rating-labels-header span {
    font-size: 0.75rem;
    color: var(--color-neutral-600);
    text-align: center;
    font-weight: 500;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.star-rating-matrix {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem 2rem;
    align-items: center;
    margin-bottom: 1rem;
}

.star-rating-matrix .rating-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-neutral-700);
    text-align: left;
}

.star-rating-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    gap: 0;
    align-items: center;
    padding: 0;
    margin: 0;
}

.star-rating {
    grid-column: 1 / -1;
    width: 100%;
    padding: 0;
    margin: 0;
}

.star-rating .stars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    gap: 0;
    align-items: center;
    padding: 0;
    margin: 0;
}

.star-rating .star {
    font-size: 1.75rem;
    color: var(--color-neutral-300);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    user-select: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-rating .star:hover {
    color: var(--color-primary);
    transform: scale(1.15);
}

.star-rating .star.active {
    color: var(--color-primary);
}

.star-rating .star.hover {
    color: var(--color-primary);
    opacity: 0.7;
}

.star-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-neutral-500);
    margin-top: 0.25rem;
}

/* Responsive para matriz de estrellas */
@media (max-width: 768px) {
    .star-rating-matrix {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .star-rating-matrix .rating-label {
        margin-bottom: 0.5rem;
    }
    
    .star-rating-labels span {
        font-size: 0.6875rem;
    }
    
    .star-rating .star {
        font-size: 1.5rem;
    }
}

/* Botones */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-neutral-100);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    min-width: 0;
    flex-shrink: 1;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb, 30, 136, 229), 0.3);
}

.btn-secondary {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.btn-secondary:hover {
    background: var(--color-neutral-200);
}

.btn-back {
    order: 1;
}

.btn-next {
    order: 2;
    margin-left: auto;
}

/* Errores */
.form-errors {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.error-message {
    color: var(--color-error, #E53935);
    font-size: 0.9375rem;
    flex: 1;
    margin: 0;
}

.error-message p {
    margin: 0;
    line-height: 1.5;
}

.error-message p:first-child {
    margin-bottom: 0.5rem;
}

.error-message-bold {
    font-weight: 700;
}

.error-message-normal {
    font-weight: 400;
}

.error-action {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-error-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-error-action:hover {
    background: var(--color-primary-dark, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 30, 136, 229), 0.3);
    color: white;
    text-decoration: none;
}

.btn-error-action svg {
    flex-shrink: 0;
}

/* Pantalla de éxito tipo alert */
.success-alert-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.success-alert {
    background: white;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--color-primary, #4595da);
}

.success-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.125rem;
    color: var(--color-neutral-700);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.success-message strong {
    color: var(--color-primary);
    font-weight: 600;
}

.success-submessage {
    font-size: 1rem;
    color: var(--color-neutral-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.success-redirect {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-neutral-200);
}

.success-redirect p {
    font-size: 0.9375rem;
    color: var(--color-neutral-600);
    margin-bottom: 1rem;
}

.success-redirect #countdown {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.125rem;
}

.success-redirect .btn-primary {
    margin-top: 0.5rem;
}

/* Resultado de tasación (mantener por compatibilidad) */
.tasacion-result {
    text-align: center;
    padding: 3rem 2rem;
}

.result-header {
    margin-bottom: 2rem;
}

.result-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: 0.5rem;
}

.result-subtitle {
    font-size: 1.125rem;
    color: var(--color-neutral-600);
}

.result-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 2rem 0;
    line-height: 1;
}

.result-message {
    font-size: 1rem;
    color: var(--color-neutral-600);
    margin: 2rem 0;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .tasacion-section {
        padding: 1.5rem 0;
    }
    
    .tasacion-section .section-container {
        padding: 0 1rem;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .progress-step {
        flex: 0 0 auto;
    }
    
    .step-label {
        font-size: 0.75rem;
        max-width: 80px;
    }
    
    .progress-line {
        display: none;
    }
    
    .tasacion-content {
        padding: 1.5rem;
        overflow-x: hidden;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0;
    }
    
    .form-row.form-row-three {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        display: grid !important;
    }
    
    .form-group-third {
        margin-bottom: 0;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .form-group-third:last-child {
        margin-bottom: 0;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        padding-left: 0;
        padding-right: 0;
    }
    
    .btn-back,
    .btn-next {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        order: unset;
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        box-sizing: border-box;
    }
    
    .btn-back {
        order: 1;
        margin-left: 0;
        margin-right: 0;
    }
    
    .btn-next {
        order: 2;
        margin-left: 0;
        margin-right: 0;
    }
    
    .result-value {
        font-size: 2.5rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn-primary,
    .result-actions .btn-secondary {
        width: 100%;
    }
    
    .amenities-list {
        grid-template-columns: 1fr;
    }
    
    .star-rating-matrix-header,
    .star-rating-matrix {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .star-rating-matrix-title {
        display: none;
    }
    
    .tasacion-map {
        height: 300px;
    }
    
    .success-alert-container {
        min-height: 50vh;
        padding: 1.5rem 1rem;
    }
    
    .success-alert {
        padding: 2rem 1.5rem;
    }
    
    .success-title {
        font-size: 1.5rem;
    }
    
    .success-message {
        font-size: 1rem;
    }
    
    .success-submessage {
        font-size: 0.9375rem;
    }
    
    .error-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .error-action {
        margin-top: 0.75rem;
        justify-content: flex-start;
    }
    
    .btn-error-action {
        width: 100%;
        justify-content: center;
    }
    
    .form-group-telefono .input-with-tooltip {
        position: relative;
    }
    
    .form-group-telefono .tooltip-trigger::before {
        white-space: normal;
        width: 100%;
        left: 0;
        right: 0;
        text-align: center;
        transform: translateY(-8px);
        bottom: 100%;
        margin-bottom: 0.5rem;
    }
    
    .form-group-telefono .tooltip-trigger.show-tooltip::before {
        transform: translateY(0);
    }
    
    .form-group-telefono .tooltip-trigger.show-tooltip::after {
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 480px) {
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.6875rem;
        max-width: 60px;
    }
    
    .result-title {
        font-size: 1.75rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
}

