/* ================================================
   TICKETIA — Register Page Styles (register.css)
   ================================================
   Archivo CSS separado para facilitar la
   personalización con la estética de la landing page.
   ================================================ */

/* ── Base ──────────────────────────────────── */
body.register-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: #0a0a14;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ── Decorative blurs ─────────────────────── */
.register-bg-blur {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.register-bg-blur .blob-top {
    position: absolute;
    top: -10rem;
    right: -10rem;
    width: 20rem;
    height: 20rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    filter: blur(48px);
}
.register-bg-blur .blob-bottom {
    position: absolute;
    bottom: -10rem;
    left: -10rem;
    width: 20rem;
    height: 20rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 50%;
    filter: blur(48px);
}

/* ── Animations ───────────────────────────── */
@keyframes regFadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reg-animate {
    animation: regFadeInUp 0.6s ease-out forwards;
    opacity: 0;
}
.reg-delay-1 { animation-delay: 100ms; }
.reg-delay-2 { animation-delay: 200ms; }
.reg-delay-3 { animation-delay: 300ms; }

/* ── Container ────────────────────────────── */
.register-container {
    position: relative;
    width: 100%;
    max-width: 28rem;
    z-index: 10;
}

/* ── Logo block ───────────────────────────── */
.register-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.register-logo .icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-bottom: 1rem;
}
.register-logo .icon-wrap svg {
    width: 2rem;
    height: 2rem;
    color: #818cf8;
}
.register-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    margin: 0;
}
.register-logo p {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0.25rem 0 0;
}

/* ── Card ─────────────────────────────────── */
.register-card {
    background: rgba(24, 24, 37, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 0 40px -8px rgba(99, 102, 241, 0.15);
}

/* ── Section divider ──────────────────────── */
.register-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}
.register-section-title .section-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.register-section-title .section-icon svg {
    width: 0.875rem;
    height: 0.875rem;
}
.register-section-title .section-icon.empresa {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}
.register-section-title .section-icon.usuario {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}
.register-section-title span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

/* ── Type toggle (empresa / autónomo) ────── */
.reg-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.reg-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(75, 85, 99, 0.4);
    background: rgba(17, 17, 27, 0.4);
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
}
.reg-type-btn svg {
    width: 1rem;
    height: 1rem;
}
.reg-type-btn:hover {
    border-color: rgba(99, 102, 241, 0.3);
    color: #d1d5db;
}
.reg-type-btn.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    color: #818cf8;
    font-weight: 600;
}

/* ── Hidden utility ──────────────────────── */
.reg-hidden {
    display: none !important;
}

/* ── Separator ────────────────────────────── */
.register-separator {
    height: 1px;
    background: rgba(75, 85, 99, 0.2);
    margin: 1.5rem 0;
}

/* ── Form fields ──────────────────────────── */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.reg-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}
.reg-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(17, 17, 27, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

/* Tooltip ayuda gestor */
.help-btn {
    background: rgba(99, 102, 241, 0.1);
    border: none;
    color: #818cf8;
    border-radius: 50%;
    width: 1.125rem;
    height: 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 0.25rem;
}
.help-btn svg { width: 0.75rem; height: 0.75rem; }
.help-btn:hover { background: rgba(99, 102, 241, 0.3); }

.reg-help-text {
    display: none;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    color: #34d399;
    font-size: 0.75rem;
    line-height: 1.4;
}
.reg-help-text.visible { display: block; }

.reg-field input::placeholder {
    color: #6b7280;
}
.reg-field input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}
.reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 480px) {
    .reg-row {
        grid-template-columns: 1fr;
    }
}

/* ── Error alert ──────────────────────────── */
.register-error {
    display: none;
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 0.875rem;
    align-items: flex-start;
    gap: 0.75rem;
}
.register-error.visible {
    display: flex;
}
.register-error svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ── Submit button ────────────────────────── */
.register-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #6366f1 100%);
    background-size: 200% 200%;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    margin-top: 0.5rem;
}
.register-btn:hover {
    background-position: 100% 100%;
    box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}
.register-btn:active {
    transform: translateY(0);
}
.register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ── Spinner ──────────────────────────────── */
.reg-spinner {
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    width: 1.125rem;
    height: 1.125rem;
    animation: regSpin 0.6s linear infinite;
}
@keyframes regSpin {
    to { transform: rotate(360deg); }
}

/* ── Footer ───────────────────────────────── */
.register-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}
.register-footer a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.register-footer a:hover {
    color: #a5b4fc;
}

/* ── Billing Toggle ──────────────────────── */
.reg-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
}
.billing-label { transition: color 0.3s; }
.billing-label.active { color: #fff; font-weight: 600; }
.badge-promo {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
    margin-left: 0.25rem;
    text-transform: uppercase;
    font-weight: 700;
}
.reg-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
}
.reg-switch input { opacity: 0; width: 0; height: 0; }
.reg-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(99, 102, 241, 0.3); border-radius: 1.5rem;
    transition: .4s;
    border: 1px solid rgba(99, 102, 241, 0.5);
}
.reg-slider:before {
    position: absolute; content: "";
    height: 1.125rem; width: 1.125rem;
    left: 0.1875rem; bottom: 0.125rem;
    background-color: #818cf8; border-radius: 50%;
    transition: .4s;
}
input:checked + .reg-slider { background-color: rgba(16, 185, 129, 0.3); border-color: rgba(16, 185, 129, 0.5); }
input:checked + .reg-slider:before { transform: translateX(1.5rem); background-color: #34d399; }

/* ── Plan Cards ──────────────────────────── */
.reg-planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.reg-planes-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.875rem;
}
.reg-plan-card {
    background: rgba(17, 17, 27, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.4);
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.reg-plan-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}
.reg-plan-card.active {
    border-color: #818cf8;
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 1px #818cf8, 0 8px 16px -4px rgba(99, 102, 241, 0.2);
}
.reg-plan-card.active::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
}
.reg-plan-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem 0;
}
.reg-plan-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem 0;
    display: flex;
    align-items:baseline;
    gap: 0.25rem;
}
.reg-plan-period {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
}
.reg-plan-features {
    list-style: none;
    padding: 0; margin: 0;
    font-size: 0.8125rem;
    color: #d1d5db;
    flex: 1;
}
.reg-plan-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.reg-plan-features svg {
    width: 1rem; height: 1rem;
    flex-shrink: 0; color: #10b981;
}
