/**
 * Biodevas Members — Public CSS v2
 * Aligned with Biodevas Theme v2.
 * Uses theme CSS variables exclusively (with fallbacks).
 */

/* ── Step Indicator ───────────────────────────── */
.bdv-step-indicator {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.bdv-step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--wp--preset--color--gris-medio, #e0e0e0);
    color: #999;
    transition: all var(--wp--custom--transition, 0.3s ease);
    position: relative;
}

.bdv-step-dot:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 0.75rem;
    height: 2px;
    background: var(--wp--preset--color--gris-medio, #e0e0e0);
    transition: background var(--wp--custom--transition, 0.3s ease);
}

.bdv-step-dot.done::after {
    background: var(--wp--preset--color--verde, #2d5a27);
}

.bdv-step-dot.active {
    background: var(--wp--preset--color--naranja, #ff8700);
    color: var(--wp--preset--color--blanco, #fff);
    box-shadow: 0 0 0 4px rgba(255, 135, 0, 0.2);
}

.bdv-step-dot.done {
    background: var(--wp--preset--color--verde, #2d5a27);
    color: var(--wp--preset--color--blanco, #fff);
}

/* ── Steps (multi-step navigation) ───────────── */
.bdv-form-step {
    display: none;
    animation: bdv-fade-in 0.3s ease;
}

.bdv-form-step.active {
    display: block;
}

@keyframes bdv-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bdv-form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}

/* ── Plan Grid ────────────────────────────────── */
.bdv-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bdv-plan-option {
    position: relative;
    cursor: pointer;
}

.bdv-plan-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bdv-plan-label {
    display: block;
    padding: 1rem 1.25rem;
    border: 2px solid var(--wp--preset--color--gris-medio, #e0e0e0);
    border-radius: var(--wp--custom--radius--default, 12px);
    text-align: center;
    transition: all var(--wp--custom--transition, 0.3s ease);
    background: var(--wp--preset--color--blanco, #fff);
    display: block;
    height: 100%;
}

.bdv-plan-label h4 {
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
    color: var(--wp--preset--color--violeta, #320028);
}

.bdv-price {
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--wp--preset--color--naranja, #ff8700);
}

.bdv-alt {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-top: 0.15rem;
}

.bdv-plan-option input:checked+.bdv-plan-label {
    border-color: var(--wp--preset--color--naranja, #ff8700);
    background: rgba(255, 135, 0, 0.06);
    box-shadow: 0 0 0 2px var(--wp--preset--color--naranja, #ff8700);
}

.bdv-plan-option:hover .bdv-plan-label {
    border-color: var(--wp--preset--color--naranja, #ff8700);
}

.bdv-plan-option input:focus-visible+.bdv-plan-label {
    outline: 3px solid var(--wp--preset--color--amarillo, #ffab00);
    outline-offset: 2px;
}

/* ── Advantages Box (from static web) ─────────── */
.bdv-advantages {
    background: var(--wp--preset--color--gris-piedra, #f4f4f4);
    border-radius: var(--wp--custom--radius--small, 8px);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    animation: bdv-fade-in 0.3s ease;
}

.bdv-advantages p {
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--wp--preset--color--violeta, #320028);
}

.bdv-advantages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bdv-advantages li {
    padding: 0.3rem 0;
}

.bdv-advantages li::before {
    content: '✓ ';
    color: var(--wp--preset--color--naranja, #ff8700);
    font-weight: 700;
}

/* ── Sub-Plans ────────────────────────────────── */
.bdv-sub-plan {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--wp--preset--color--gris-piedra, #f4f4f4);
    border-radius: var(--wp--custom--radius--small, 8px);
    animation: bdv-fade-in 0.3s ease;
}

.bdv-sub-plan label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    cursor: pointer;
    font-size: 0.92rem;
}

.bdv-sub-plan input[type="radio"] {
    accent-color: var(--wp--preset--color--naranja, #ff8700);
}

/* ── Grid ─────────────────────────────────────── */
.bdv-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .bdv-grid-2 {
        grid-template-columns: 1fr;
    }
}

.bdv-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .bdv-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .bdv-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ── Fields ───────────────────────────────────── */
.bdv-field {
    margin-bottom: 1rem;
}

.bdv-field label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--wp--preset--color--violeta, #320028);
}

.bdv-field input,
.bdv-field select,
.bdv-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--wp--preset--color--gris-medio, #e0e0e0);
    border-radius: var(--wp--custom--radius--small, 8px);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--wp--custom--transition, 0.3s ease),
        box-shadow var(--wp--custom--transition, 0.3s ease);
    background: var(--wp--preset--color--blanco, #fff);
    color: var(--wp--preset--color--antracita, #1a1a1a);
}

.bdv-field input:focus,
.bdv-field select:focus,
.bdv-field textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--naranja, #ff8700);
    box-shadow: 0 0 0 4px rgba(255, 135, 0, 0.12);
}

.bdv-field input:focus-visible,
.bdv-field select:focus-visible,
.bdv-field textarea:focus-visible {
    outline: 3px solid var(--wp--preset--color--amarillo, #ffab00);
    outline-offset: 2px;
}

/* ── File Upload (from static web) ────────────── */
.bdv-field input[type="file"] {
    padding: 0.5rem;
    border-style: dashed;
    cursor: pointer;
}

.bdv-field input[type="file"]:hover {
    border-color: var(--wp--preset--color--naranja, #ff8700);
    background: rgba(255, 135, 0, 0.03);
}

.bdv-payment-info {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.3rem;
}

.bdv-payment-info strong {
    color: var(--wp--preset--color--violeta, #320028);
}

/* ── Errors ───────────────────────────────────── */
.bdv-error {
    color: var(--wp--preset--color--naranja-intenso, #ff500a);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    display: none;
}

.bdv-field.has-error input,
.bdv-field.has-error select,
.bdv-field.has-error textarea {
    border-color: var(--wp--preset--color--naranja-intenso, #ff500a);
}

.bdv-field.has-error .bdv-error {
    display: block;
}

/* ── Check groups ─────────────────────────────── */
.bdv-check-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.bdv-check-group input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--wp--preset--color--naranja, #ff8700);
    flex-shrink: 0;
}

.bdv-check-group label {
    font-size: 0.88rem;
    line-height: 1.4;
}

.bdv-check-group a {
    color: var(--wp--preset--color--naranja, #ff8700);
}

.bdv-check-group a:hover {
    color: var(--wp--preset--color--naranja-intenso, #ff500a);
}

/* ── Age Badge ────────────────────────────────── */
.bdv-age-badge {
    display: inline-block;
    background: var(--wp--preset--color--gris-piedra, #f4f4f4);
    padding: 0.2rem 0.6rem;
    border-radius: var(--wp--custom--radius--pill, 50px);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* ── Minor Notice ─────────────────────────────── */
.bdv-minor-notice {
    background: rgba(255, 171, 0, 0.1);
    border: 1px solid var(--wp--preset--color--amarillo, #ffab00);
    border-radius: var(--wp--custom--radius--small, 8px);
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.bdv-minor-notice strong {
    color: var(--wp--preset--color--granate, #7d0032);
}

/* ── Summary Table ────────────────────────────── */
.bdv-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.bdv-summary-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--wp--preset--color--gris-medio, #e0e0e0);
    font-size: 0.92rem;
}

.bdv-summary-table td:first-child {
    font-weight: 700;
    width: 40%;
    color: var(--wp--preset--color--violeta, #320028);
}

/* ── Card Preview ─────────────────────────────── */
.bdv-card-preview {
    background: linear-gradient(135deg,
            var(--wp--preset--color--violeta, #320028),
            var(--wp--preset--color--granate, #7d0032));
    color: var(--wp--preset--color--blanco, #fff);
    border-radius: var(--wp--custom--radius--default, 12px);
    padding: 1.5rem;
    max-width: 420px;
    margin: 1.5rem auto;
    position: relative;
    overflow: hidden;
}

.bdv-card-preview::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 135, 0, 0.2);
    pointer-events: none;
}

.bdv-card-preview h3 {
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
    color: var(--wp--preset--color--amarillo, #ffab00);
    margin: 0 0 0.2rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.bdv-card-name {
    font-size: 1.4rem;
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.bdv-card-id {
    font-size: 0.85rem;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.bdv-card-type {
    display: inline-block;
    background: var(--wp--preset--color--naranja, #ff8700);
    padding: 0.15rem 0.7rem;
    border-radius: var(--wp--custom--radius--pill, 50px);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

.bdv-card-date {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.3rem;
    position: relative;
    z-index: 1;
}

/* ── Interest Grid ────────────────────────────── */
.bdv-interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bdv-interest-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    background: var(--wp--preset--color--gris-piedra, #f4f4f4);
    border-radius: var(--wp--custom--radius--small, 8px);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--wp--custom--transition, 0.3s ease);
    border: 2px solid transparent;
}

.bdv-interest-grid label:hover {
    background: rgba(255, 135, 0, 0.08);
}

.bdv-interest-grid input:checked+span,
.bdv-interest-grid label:has(input:checked) {
    border-color: var(--wp--preset--color--naranja, #ff8700);
    background: rgba(255, 135, 0, 0.06);
}

.bdv-interest-grid input {
    accent-color: var(--wp--preset--color--naranja, #ff8700);
}

/* ── Success Screen ───────────────────────────── */
.bdv-success-screen {
    text-align: center;
    padding: 3rem 0;
}

.bdv-success-screen h2 {
    color: var(--wp--preset--color--naranja, #ff8700);
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
}

.bdv-success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bdv-bounce 0.6s ease;
}

@keyframes bdv-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ── Utilities ────────────────────────────────── */
.bdv-small {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.3rem;
}

.bdv-text-center {
    text-align: center;
}

/* ── Buttons (fallback if theme doesn't provide) ── */
.bdv-form-nav .btn,
.biodevas-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--wp--custom--radius--pill, 50px);
    font-family: var(--wp--preset--font-family--display, 'Outfit', sans-serif);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all var(--wp--custom--transition, 0.3s ease);
    line-height: 1;
}

.btn-primary {
    background: var(--wp--preset--color--naranja, #ff8700);
    color: var(--wp--preset--color--blanco, #fff);
    border-color: var(--wp--preset--color--naranja, #ff8700);
}

.btn-primary:hover {
    background: var(--wp--preset--color--naranja-intenso, #ff500a);
    border-color: var(--wp--preset--color--naranja-intenso, #ff500a);
}

.btn-outline {
    background: transparent;
    color: var(--wp--preset--color--naranja, #ff8700);
    border-color: var(--wp--preset--color--naranja, #ff8700);
}

.btn-outline:hover {
    background: var(--wp--preset--color--naranja, #ff8700);
    color: var(--wp--preset--color--blanco, #fff);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:focus-visible {
    outline: 3px solid var(--wp--preset--color--amarillo, #ffab00);
    outline-offset: 2px;
}

/* ── Print ────────────────────────────────────── */
/* ── Check Group (checkbox + label inline layout) ── */
.bdv-check-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.bdv-check-group input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--wp--preset--color--naranja, #ff8700);
    cursor: pointer;
}

.bdv-check-group label {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.45;
    cursor: pointer;
}

/* ── Print ────────────────────────────────────── */
@media print {

    .bdv-step-indicator,
    .bdv-form-nav,
    .btn {
        display: none !important;
    }

    .bdv-card-preview {
        break-inside: avoid;
    }
}

/* ── Reduced Motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}