/* Transport Marketplace - Pre-registration Form Styles */
.transport-preregistration-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.transport-preregistration-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    border: 1px solid #e1e5e9;
}

/* Title Styles */
.preregistration-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.preregistration-subtitle {
    font-size: 1rem;
    color: #6b7280;
    text-align: center;
    margin: 0 0 2rem 0;
    line-height: 1.4;
}

/* Form Styles */
.transport-preregistration-form {
    width: 100%;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.field-label .required {
    color: #ef4444;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #2f60ca;
    box-shadow: 0 0 0 3px rgba(47, 96, 202, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-input.success {
    border-color: #10b981;
}

/* Submit Button */
.form-submit {
    margin-top: 1rem;
}

.submit-button {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2f60ca 0%, #1d4ed8 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(47, 96, 202, 0.2);
}

.submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(47, 96, 202, 0.3);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(47, 96, 202, 0.1);
}

/* Spinner Animation */
.button-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.form-messages {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

.form-messages.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-messages.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-messages.loading {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Login Link */
.preregistration-login-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.preregistration-login-link p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.preregistration-login-link a {
    color: #2f60ca;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.preregistration-login-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Already Logged In State */
.transport-preregistration-already-logged {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.transport-preregistration-already-logged p {
    margin: 0 0 1rem 0;
    color: #475569;
}

.transport-preregistration-already-logged .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2f60ca;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.transport-preregistration-already-logged .button:hover {
    background: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 640px) {
    .transport-preregistration-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .transport-preregistration-form-wrapper {
        padding: 1.5rem;
        border-radius: 8px;
    }
    
    .preregistration-title {
        font-size: 1.5rem;
    }
    
    .preregistration-subtitle {
        font-size: 0.875rem;
    }
    
    .form-input {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-button {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .transport-preregistration-form-wrapper {
        padding: 1.25rem;
    }
    
    .field-group {
        gap: 0.375rem;
    }
    
    .form-fields {
        gap: 1.25rem;
    }
}

/* ======================================
   ESTILOS PARA POLÍTICAS DE PRIVACIDAD
   ====================================== */

/* Contenedor del grupo de políticas */
.privacy-policy-group {
    margin-bottom: 0 !important;
}

/* Label principal del checkbox de políticas */
.privacy-policy-label {
    display: flex !important;
    align-items: flex-start !important;
    cursor: pointer !important;
    padding: 16px 20px !important;
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    background: #fafbfc !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
    font-size: 0.875rem !important;
    color: #374151 !important;
    position: relative !important;
    margin-bottom: 0 !important;
}

.privacy-policy-label:hover {
    background-color: #f3f4f6 !important;
    border-color: #2f60ca !important;
}

/* Checkbox personalizado */
.privacy-policy-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 12px !important;
    margin-bottom: 0 !important;
    margin-top: 2px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

/* Enlaces de políticas */
.privacy-policy-link {
    color: #2f60ca !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    transition: color 0.3s ease !important;
}

.privacy-policy-link:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.privacy-policy-link:focus {
    outline: 2px solid #2f60ca !important;
    outline-offset: 2px !important;
    border-radius: 2px !important;
}

/* Asterisco requerido */
.privacy-policy-label .required {
    color: #dc2626 !important;
    font-weight: bold !important;
    margin-left: 4px !important;
}

/* Estado de error para checkbox */
.privacy-policy-group.error .privacy-policy-label {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

/* Estado de validado */
.privacy-policy-group.success .privacy-policy-label {
    border-color: #16a34a !important;
    background-color: #f0fdf4 !important;
}

/* Icono de verificación cuando está checked */
input[name="privacy_policy_accepted"]:checked + .checkmark::after {
    content: '✓' !important;
    position: absolute !important;
    right: 16px !important;
    top: 16px !important;
    color: #16a34a !important;
    font-weight: bold !important;
    font-size: 16px !important;
}

/* Responsive para políticas de privacidad */
@media (max-width: 768px) {
    .privacy-policy-label {
        padding: 12px 16px !important;
        font-size: 0.8125rem !important;
    }
    
    .privacy-policy-label input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        margin-right: 10px !important;
    }
}

@media (max-width: 480px) {
    .privacy-policy-label {
        padding: 10px 12px !important;
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    .privacy-policy-label input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        margin-right: 8px !important;
    }
}

/* Accesibilidad mejorada */
.privacy-policy-label:focus-within {
    outline: 2px solid #2f60ca !important;
    outline-offset: 2px !important;
}