/**
 * AI Smart Content - Página de Planes (Sign Up)
 * Estilo referencia: dos columnas, panel izquierdo gradiente verde, panel derecho negro
 */

@import url('base.css');

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.planes-main {
    min-height: 100vh;
    background: #0a0a0a;
}

.planes-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ============================================
   PANEL IZQUIERDO - Hero (estructura como brands: fondo + esquina)
   ============================================ */
.planes-hero {
    flex: 0 0 50%;
    min-width: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Fondo: gradiente verde (como brands tiene brand-dashboard-background) */
.planes-hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.planes-background-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0d1f1a 0%, #0a1612 35%, #0f2e22 70%, #134330 100%);
}

.planes-background-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 40%;
    background: radial-gradient(ellipse at center, rgba(19, 67, 48, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

/* Contenido del hero: centrado, título arriba */
.planes-hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    box-sizing: border-box;
}

.planes-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Toggle Mensual / Anual */
.planes-billing-toggle {
    display: inline-flex;
    background: rgba(15, 46, 34, 0.9);
    border-radius: 10px;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0;
}

.planes-toggle-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.planes-toggle-btn:hover {
    color: #ffffff;
}

.planes-toggle-btn.active {
    background: #ffffff;
    color: #0a1612;
}

.planes-hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.5;
}

/* Precios: mostrar mensual u anual según toggle */
.plan-card-price .price-annual {
    display: none;
}

.planes-hero.billing-annual .plan-card-price .price-monthly {
    display: none;
}

.planes-hero.billing-annual .plan-card-price .price-annual {
    display: inline;
}

/* Tarjetas de planes: rectángulos verticales con detalles dentro */
.planes-plans {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.planes-hero .plan-card-small {
    width: 150px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    background: rgba(15, 46, 34, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.planes-hero .plan-card-small:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(19, 67, 48, 0.95);
}

.planes-hero .plan-card-small.selected {
    background: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.planes-hero .plan-card-name {
    color: rgba(255, 255, 255, 0.95);
}

.planes-hero .plan-card-small.selected .plan-card-name {
    color: #0a1612;
}

.planes-hero .plan-card-price {
    color: #ffffff;
}

.planes-hero .plan-card-price span {
    color: rgba(255, 255, 255, 0.8);
}

.planes-hero .plan-card-small.selected .plan-card-price,
.planes-hero .plan-card-small.selected .plan-card-price span {
    color: #0a1612;
}

.planes-hero .plan-card-credits {
    color: rgba(255, 255, 255, 0.85);
}

.planes-hero .plan-card-small.selected .plan-card-credits {
    color: #0a1612;
}

/* Vertical cards: nombre arriba, precio y créditos centrados */
.planes-hero .plan-card-small .plan-card-name {
    order: 1;
    flex: none;
    margin: 0;
    text-align: center;
}

.planes-hero .plan-card-small .plan-card-price {
    order: 2;
    text-align: center;
}

.planes-hero .plan-card-small .plan-card-credits {
    order: 3;
    text-align: center;
}

/* Detalles dentro de cada card */
.plan-card-details {
    order: 4;
    margin: 0.5rem 0 0 0;
    padding: 0 0 0 1rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    list-style: disc;
}

.planes-hero .plan-card-small.selected .plan-card-details {
    color: rgba(10, 22, 18, 0.85);
}

.plan-card-details li {
    margin-bottom: 0.2rem;
}

/* ============================================
   PANEL DERECHO - Formulario (fondo negro). Contenido y botón solo dentro de este panel.
   ============================================ */
.planes-form-panel {
    flex: 0 0 50%;
    min-width: 0;
    width: 50%;
    max-width: 50%;
    min-height: 100vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Ancho fijo del contenido: gana sobre #app-container > div div { max-width: 100% } de app.css */
.planes-form-panel .planes-form-inner {
    width: 100%;
    max-width: 420px !important;
    min-width: 0;
    box-sizing: border-box;
}

/* Formulario no puede superar el ancho del inner */
.planes-form-panel .registration-form {
    max-width: 100%;
    box-sizing: border-box;
}

.planes-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
}

.planes-form-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 1.75rem 0;
}

.plan-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.plan-card-price {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
}

.plan-card-price .price-monthly span,
.plan-card-price .price-annual span {
    font-size: 0.7rem;
    font-weight: 400;
    margin-left: 0.2rem;
}

.plan-card-credits {
    font-size: 0.8rem;
}

/* ============================================
   FORMULARIO
   ============================================ */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #9ca3af;
}

.input-wrapper {
    position: relative;
}

.planes-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.95rem;
    color: #ffffff;
    background: #1a1a1a;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.planes-input::placeholder {
    color: #6b7280;
}

.planes-input:hover {
    border-color: #3d3d3d;
}

.planes-input:focus {
    border-color: #4b5563;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

.registration-form .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
    pointer-events: none;
}

.registration-form .input-icon.password-toggle {
    left: auto;
    right: 1rem;
    pointer-events: auto;
    cursor: pointer;
}

.planes-input-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

/* Botón de envío: mismo contenedor que el resto del formulario, dentro del panel derecho */
.planes-submit-wrap {
    margin-top: 0.5rem;
    max-width: 100%;
}

.planes-btn-submit {
    width: 100%;
    max-width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-sizing: border-box;
}

.planes-btn-submit:hover {
    background: #374151;
    border-color: #4b5563;
}

.planes-btn-submit:active {
    transform: scale(0.99);
}

.planes-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.planes-login-link {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    margin: 1.5rem 0 0 0;
}

.planes-login-link .login-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

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

/* ============================================
   PANTALLA CONFIRMACIÓN EMAIL
   ============================================ */
.email-confirmation-screen {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: auto;
}

.email-confirmation-screen .planes-layout {
    width: 100%;
}

.email-confirmation-screen .planes-form-panel {
    align-items: center;
    justify-content: center;
}

.confirmation-content {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 1rem 0;
}

.confirmation-icon {
    font-size: 3.5rem;
    color: #22c55e;
    margin-bottom: 1.25rem;
}

.confirmation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
}

.confirmation-message {
    font-size: 0.95rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.confirmation-message strong {
    color: #ffffff;
}

.confirmation-instructions {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-resend-email {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-resend-email:hover:not(:disabled) {
    background: #f3f4f6;
}

.btn-resend-email:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-back-login {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-back-login:hover {
    border-color: #4b5563;
    background: #1a1a1a;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .planes-layout {
        flex-direction: column;
    }

    .planes-hero {
        flex: none;
        min-height: auto;
        height: auto;
        padding-bottom: 8rem;
    }

    .planes-hero-content {
        max-width: calc(100% - 2rem);
    }

    .planes-form-panel {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 2rem 1.5rem 3rem;
    }

    .planes-plans {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .planes-hero-content {
        max-width: calc(100% - 1.5rem);
        padding: 1.5rem 1rem 2rem;
    }

    .planes-hero .plan-card-small {
        width: 100%;
        min-height: 200px;
        max-width: 200px;
    }

    .planes-plans {
        flex-direction: column;
        align-items: center;
    }

    .planes-form-panel {
        padding: 1.5rem 1.25rem 2rem;
    }
}

@media (max-width: 480px) {
    .planes-form-panel .planes-form-inner {
        max-width: 100% !important;
    }

    .planes-form-title {
        font-size: 1.5rem;
    }

    .confirmation-title {
        font-size: 1.25rem;
    }

    .confirmation-icon {
        font-size: 2.75rem;
    }
}
