/* auth-modal.css - SOLO el modal de login/registro, extraido de zokko-main.css
   para paginas bespoke (reclamar-ficha) que NO cargan el CSS global.
   Fuente: :root(18-88) + form base(579-609) + modal/registro(937-1431) + btn-apple(3458-3461). */

:root {
  --zokko-font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Colores principales */
  --primary: #00a693;
  --primary-hover: #008a7a;
  --primary-light: #e6f7f5;
  
  /* Escala de grises */
  --background: #ffffff;
  --foreground: #1a1a1a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Colores secundarios */
  --secondary: #f3f3f5;
  --accent: #ff6b35;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Tipografía */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Bordes y sombras */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}


/* --- form base --- */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-base);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background-color: white;
  transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 166, 147, 0.1);
}


/* --- modal + registro --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: calc(100% - 40px);
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    margin: 16px;
    overscroll-behavior: contain;
}

#loginModal .modal-container {
    max-height: calc(100vh - 32px);
}

/* Modal de registro más compacto */
#registerModal .modal-container {
    max-width: 460px;
    max-height: calc(100vh - 32px);
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-600);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.modal-content {
    padding: 32px;
}

/* Contenido del modal de registro más compacto */
#registerModal .modal-content {
    padding: 24px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 8px 0;
    text-align: center;
}

.modal-subtitle {
    font-size: 16px;
    color: var(--gray-600);
    margin: 0 0 32px 0;
    text-align: center;
}

/* Subtítulo más compacto en registro */
#registerModal .modal-subtitle {
    margin: 0 0 20px 0;
}

#loginModal .modal-subtitle {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

#loginModal .form-group {
    margin-bottom: 16px;
}

/* Espaciado más compacto en registro */
#registerModal .form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-900);
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 16px;
    z-index: 1;
}

.modal-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 147, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--gray-700);
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    flex-wrap: wrap;
}

.remember-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-checkbox {
    margin: 0;
}

.remember-label {
    margin: 0;
    color: var(--gray-700);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.forgot-link:hover {
    text-decoration: underline;
}

.forgot-link-disabled {
    color: var(--gray-500);
    cursor: default;
    text-align: right;
}

.forgot-link-disabled:hover {
    text-decoration: none;
}

.btn-modal-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.btn-modal-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    margin: 18px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider-text {
    margin: 0 14px;
    color: var(--gray-500);
    font-size: 13px;
}

.social-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background: var(--gray-50);
    transform: translateY(-1px);
}

/* Botón "Continuar con Google" — estándar Google, discreto y a la altura de
   .btn-modal-submit / .modal-input (mismo alto, radio y tipografía del modal) */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    margin-bottom: 16px;
}

.btn-google:hover {
    background: #f7f8f8;
    border-color: #d2d3d5;
}

.btn-google:disabled {
    cursor: default;
    opacity: 0.7;
}

.btn-google svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.signup-link {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
}

.signup-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.signup-link a:hover {
    text-decoration: underline;
}

.login-link {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.link-button:hover,
.link-button:focus {
    text-decoration: underline;
}

/* Estilos específicos para el formulario de registro */
.account-type-section {
    margin-bottom: 20px;
}

.account-type-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--gray-900);
    font-size: 14px;
}

.account-type-options {
    display: flex;
    gap: 12px;
}

.account-type-option {
    flex: 1;
    padding: 12px 8px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.account-type-option:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.account-type-option.selected {
    border-color: var(--primary);
    background: rgba(0, 168, 147, 0.05);
}

.account-type-option input[type="radio"] {
    display: none;
}

.account-type-option i {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--gray-600);
}

.account-type-option.selected i {
    color: var(--primary);
}

.account-type-option label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    margin: 0;
}

.account-type-option.selected label {
    color: var(--primary);
}

.terms-wrapper {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.terms-checkbox {
    margin: 4px 0 0 0;
    flex-shrink: 0;
}

.terms-label {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
    margin: 0;
}

.terms-label a {
    color: var(--primary);
    text-decoration: none;
}

.terms-label a:hover {
    text-decoration: underline;
}

/* ── Registro compacto: que el modal entre SIN scroll en una sola ventana
   (petición de Joseba). Solo afecta a #registerModal; el de login no se toca.
   Reduce espacios muertos verticales sin tocar tamaños de toque importantes. ── */
#registerModal .modal-content { padding: 18px 24px 20px; }
#registerModal .modal-title { font-size: 22px; margin-bottom: 4px; }
#registerModal .modal-subtitle { font-size: 14px; margin: 0 0 12px 0; }
#registerModal .account-type-section { margin-bottom: 12px; }
#registerModal .account-type-label { margin-bottom: 6px; }
#registerModal .account-type-option { padding: 8px; }
#registerModal .account-type-option i { font-size: 18px; margin-bottom: 3px; }
#registerModal .form-group { margin-bottom: 11px; }
#registerModal .form-label { margin-bottom: 5px; }
#registerModal .modal-input { padding: 10px 16px 10px 40px; }
#registerModal .terms-wrapper { margin-bottom: 12px; }
#registerModal .terms-label { line-height: 1.35; }
#registerModal .btn-modal-submit { padding: 11px; margin-bottom: 8px; }
#registerModal .btn-google { padding: 11px; margin-bottom: 8px; }
#registerModal .divider { margin: 12px 0; }
#registerModal .login-link { margin-top: 12px !important; }


/* --- boton Apple --- */
.btn-apple{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 24px;margin-top:12px;background:#000;color:#fff;border:1px solid #000;border-radius:8px;font-size:16px;font-weight:500;font-family:inherit;line-height:1.2;cursor:pointer;transition:opacity .15s ease;}
.btn-apple:hover{opacity:.85;}
.btn-apple:disabled{cursor:default;opacity:.7;}
.btn-apple svg{width:18px;height:18px;flex:0 0 18px;fill:#fff;}

