/* Layout toggling: on small screens, show mobile, hide desktop */

.mobile-registration {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f9fafb;
    padding-top: 60px; /* espacio para el header fijo compartido */
}

.desktop-registration {
    display: none;
}

/* Basic mobile structure specific to registration */

.mobile-registration-header {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
}

.mobile-header-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

.mobile-registration-logo {
    max-height: 42px;
}

.mobile-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Progress bar */

.mobile-progress-container {
    padding: 8px 16px 12px;
    margin-top: 12px; /* más espacio bajo el header fijo */
    background-color: #f9fafb;
}

.mobile-progress-bar {
    width: 100%;
    height: 5px;
    background-color: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.mobile-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.mobile-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.mobile-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.5;
    font-size: 0.75rem;
}

.mobile-step.active {
    opacity: 1;
}

.mobile-step-number {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background-color: #e5e7eb;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.mobile-step.active .mobile-step-number {
    background-color: #2563eb;
    color: #ffffff;
}

.mobile-step-label {
    color: #6b7280;
    font-size: 0.75rem;
}

.mobile-step.active .mobile-step-label {
    color: #111827;
    font-weight: 600;
}

/* Main content */

.mobile-registration-content {
    flex: 1;
    padding: 16px 16px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.mobile-registration-step {
    display: none;
}

.mobile-registration-step.active {
    display: block;
}

.mobile-step-header {
    margin-bottom: 16px;
}

.mobile-step-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.mobile-step-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Form sections */

.mobile-registration-form {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mobile-form-section {
    margin-bottom: 20px;
}

.mobile-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #111827;
}

.mobile-section-header i {
    color: #2563eb;
}

.mobile-section-header h3 {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.mobile-form-group {
    margin-bottom: 14px;
}

.mobile-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.mobile-form-input,
.mobile-form-select,
.mobile-form-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    font-size: 0.9rem;
    background-color: #ffffff;
    color: #111827;
}

/* Evitar bordes rojos por defecto en campos requeridos hasta que la validación los marque */
.mobile-form-input:required:invalid,
.mobile-form-select:required:invalid,
.mobile-form-textarea:required:invalid {
    border-color: #e5e7eb;
    box-shadow: none;
}

.mobile-form-input:focus,
.mobile-form-select:focus,
.mobile-form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

.mobile-input-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

.mobile-form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-form-row .mobile-form-group {
    flex: 1;
}

/* Radio buttons */

.mobile-radio-group {
    display: flex;
    gap: 8px;
}

.mobile-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    font-size: 0.8rem;
}

.mobile-radio-label input {
    display: none;
}

.mobile-radio-custom {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    box-sizing: border-box;
}

.mobile-radio-label input:checked + .mobile-radio-custom {
    border-color: #2563eb;
    background-color: #2563eb;
}

.mobile-radio-text {
    color: #111827;
}

/* Terms */

.mobile-terms-section {
    margin: 8px 0 4px;
}

.mobile-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: #374151;
    position: relative;
}

.mobile-checkbox-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.mobile-checkbox-custom {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
}

.mobile-checkbox-label input:checked + .mobile-checkbox-custom {
    background-color: #2563eb;
    border-color: #2563eb;
}

.mobile-checkbox-text a {
    color: #2563eb;
}

/* Buttons */

.mobile-form-actions,
.mobile-payment-actions,
.mobile-final-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 10px 16px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.mobile-btn-primary {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.mobile-btn-secondary {
    background-color: #e5e7eb;
    color: #111827;
}

.mobile-btn-outline {
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: #111827;
}

.mobile-btn-whatsapp {
    background-color: #22c55e;
    color: #ffffff;
}

/* Payment section */

.mobile-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-payment-option {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid transparent;
}

.mobile-payment-option.active {
    border-color: #2563eb;
}

.mobile-payment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eff6ff;
    color: #2563eb;
}

.mobile-payment-icon.whatsapp-icon {
    background-color: #ecfdf3;
    color: #16a34a;
}

.mobile-payment-title h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.mobile-payment-title p {
    font-size: 0.8rem;
    color: #6b7280;
}

.mobile-payment-details {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #374151;
}

.mobile-bank-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.mobile-bank-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.mobile-bank-info {
    font-size: 0.8rem;
}

.mobile-bank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mobile-copy-btn {
    border: none;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-upload-section {
    margin-top: 8px;
}

.mobile-upload-title {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.mobile-upload-area {
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    padding: 12px;
    text-align: center;
    background-color: #f9fafb;
    cursor: pointer;
}

.mobile-upload-area i {
    font-size: 1.3rem;
    color: #2563eb;
}

.mobile-upload-area p {
    margin: 4px 0 2px;
    font-size: 0.85rem;
}

.mobile-upload-hint {
    font-size: 0.7rem;
    color: #6b7280;
}

.mobile-file-preview {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-file-preview.hidden {
    display: none;
}

.mobile-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-file-name {
    font-size: 0.8rem;
}

.mobile-file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.mobile-remove-file {
    border: none;
    background: transparent;
    color: #dc2626;
}

.mobile-payment-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #4b5563;
}

.mobile-switch-btn {
    margin-top: 4px;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 0.85rem;
}

/* Confirmation */

.mobile-confirmation-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-confirmation-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mobile-confirmation-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    margin-bottom: 8px;
}

.mobile-confirmation-message h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.mobile-confirmation-message p {
    font-size: 0.85rem;
    color: #4b5563;
}

.mobile-processing-time,
.mobile-credentials-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.8rem;
}

/* Contact card */

.mobile-contact-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mobile-contact-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.mobile-contact-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-contact-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: inherit;
}

.mobile-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eff6ff;
    color: #2563eb;
}

.mobile-contact-icon.whatsapp {
    background-color: #ecfdf3;
    color: #16a34a;
}

.mobile-contact-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Security notice */

.mobile-security-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background-color: #fefce8;
    font-size: 0.8rem;
    color: #854d0e;
}

.mobile-security-notice i {
    margin-top: 2px;
}

/* Footer */

.mobile-registration-footer {
    background-color: #0f172a;
    color: #e5e7eb;
    padding: 16px;
    margin-top: auto;
}

.mobile-footer-content {
    text-align: center;
    font-size: 0.8rem;
}

.mobile-footer-logo img {
    margin-bottom: 4px;
}

.mobile-footer-logo h3 {
    font-size: 0.95rem;
}

.mobile-footer-logo p {
    font-size: 0.75rem;
    color: #9ca3af;
}

.mobile-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin: 10px 0;
}

.mobile-footer-links a {
    color: #e5e7eb;
}

.mobile-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.mobile-contact-link {
    color: #e5e7eb;
}

.mobile-footer-copyright {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #9ca3af;
}

/* Language modal */

.mobile-language-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.mobile-language-modal.active {
    display: flex;
}

.mobile-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.5);
}

.mobile-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 14px;
    margin: 0 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

.mobile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mobile-modal-body {
    margin-top: 4px;
}

.mobile-language-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    font-size: 0.9rem;
}

.mobile-language-option.active {
    border-color: #2563eb;
    background-color: #eff6ff;
}

/* Toast notifications */

.mobile-toast {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
}

.mobile-toast.show {
    opacity: 1;
    transform: translate(-50%, -4px);
}

.mobile-toast-info {
    background-color: #2563eb;
}

.mobile-toast-success {
    background-color: #16a34a;
}

.mobile-toast-error {
    background-color: #dc2626;
}

/* Error states */

.mobile-form-input.error,
.mobile-form-select.error,
.mobile-form-textarea.error {
    border-color: #ef4444;
}

.mobile-error-message {
    margin-top: 2px;
    font-size: 0.75rem;
    color: #b91c1c;
}

@media (min-width: 769px) {
    /* Safety: never show mobile layout on larger screens */
    .mobile-registration {
        display: none !important;
    }

    .desktop-registration {
        display: block !important;
    }
}
