/* ============================================
   🧙 WIZARD — Cotizador de Ideas
   Multi-step interactive form
   ============================================ */

/* --- OVERLAY --- */
.wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 1rem;
}

.wizard-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- MODAL --- */
.wizard {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 35, 0.98));
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 0 80px rgba(108, 92, 231, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wizard-overlay.active .wizard {
    transform: translateY(0) scale(1);
}

/* --- CLOSE BUTTON --- */
.wizard__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    z-index: 2;
}

.wizard__close:hover {
    background: rgba(255, 77, 77, 0.15);
    border-color: rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
    transform: rotate(90deg);
}

/* --- HEADER --- */
.wizard__header {
    padding: 2rem 2rem 0;
    text-align: center;
}

.wizard__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(108, 92, 231, 0.12);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.wizard__badge-dot {
    width: 6px;
    height: 6px;
    background: #6c5ce7;
    border-radius: 50%;
    animation: wizardPulse 2s ease-in-out infinite;
}

@keyframes wizardPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* --- PROGRESS BAR --- */
.wizard__progress {
    padding: 1.5rem 2rem 0;
}

.wizard__progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.wizard__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe, #6c5ce7);
    background-size: 200% 100%;
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.wizard__progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- STEPS CONTAINER --- */
.wizard__body {
    padding: 1.5rem 2rem 2rem;
    position: relative;
    min-height: 320px;
}

/* --- INDIVIDUAL STEP --- */
.wizard__step {
    display: none;
    animation: wizardStepIn 0.4s ease-out;
}

.wizard__step.active {
    display: block;
}

@keyframes wizardStepIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard__step-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.wizard__step-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* --- OPTION CARDS (Steps 1, 2) --- */
.wizard__options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.wizard__option {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.1rem 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.wizard__option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(162, 155, 254, 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 14px;
}

.wizard__option:hover {
    border-color: rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
}

.wizard__option:hover::before {
    opacity: 1;
}

.wizard__option.selected {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.12);
    box-shadow: 0 0 25px rgba(108, 92, 231, 0.2);
}

.wizard__option.selected::before {
    opacity: 1;
}

.wizard__option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: #6c5ce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
    font-weight: 700;
}

.wizard__option-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    display: block;
}

.wizard__option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
}

/* 3-column grid for step 2 */
.wizard__options--3col {
    grid-template-columns: repeat(2, 1fr);
}

.wizard__options--3col .wizard__option:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
}

/* --- TEXTAREA (Step 3) --- */
.wizard__textarea-wrap {
    position: relative;
}

.wizard__textarea {
    width: 100%;
    min-height: 130px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wizard__textarea:focus {
    outline: none;
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.12);
}

.wizard__textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.wizard__char-count {
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

.wizard__char-count.near-limit {
    color: #ffd93d;
}

.wizard__char-count.at-limit {
    color: #ff4d4d;
}

/* --- RADIO OPTIONS (Steps 4, 5) --- */
.wizard__radios {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wizard__radio {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wizard__radio:hover {
    border-color: rgba(108, 92, 231, 0.35);
    background: rgba(108, 92, 231, 0.06);
}

.wizard__radio.selected {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.1);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.12);
}

.wizard__radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
    transition: all 0.25s ease;
}

.wizard__radio.selected .wizard__radio-dot {
    border-color: #6c5ce7;
    background: #6c5ce7;
}

.wizard__radio.selected .wizard__radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.wizard__radio-content {
    flex: 1;
}

.wizard__radio-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.wizard__radio-hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.15rem;
}

/* --- CONTACT FORM (Step 6) --- */
.wizard__fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wizard__field {
    position: relative;
}

.wizard__field-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.wizard__input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wizard__input:focus {
    outline: none;
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.12);
}

.wizard__input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.wizard__input.error {
    border-color: rgba(255, 77, 77, 0.5);
}

.wizard__field-error {
    font-size: 0.75rem;
    color: #ff6b6b;
    margin-top: 0.35rem;
    padding-left: 0.5rem;
    display: none;
}

.wizard__field-error.visible {
    display: block;
}

/* --- NAVIGATION BUTTONS --- */
.wizard__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.75rem;
    gap: 1rem;
}

.wizard__btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    border: none;
}

.wizard__btn--prev {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard__btn--prev:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.wizard__btn--next {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    flex: 1;
    max-width: 220px;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
}

.wizard__btn--next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(108, 92, 231, 0.5);
}

.wizard__btn--next:active {
    transform: translateY(0);
}

.wizard__btn--next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wizard__btn--submit {
    background: linear-gradient(135deg, #00b894, #55efc4);
    color: #1a1a2e;
    flex: 1;
    max-width: 280px;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 184, 148, 0.35);
}

.wizard__btn--submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 184, 148, 0.5);
}

.wizard__btn--submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* --- TRUST BADGE --- */
.wizard__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- SUCCESS SCREEN --- */
.wizard__success {
    text-align: center;
    padding: 2rem 0;
}

.wizard__success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.wizard__success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.wizard__success-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.wizard__estimate {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.wizard__estimate-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
}

.wizard__estimate-price {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wizard__estimate-time {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.3rem;
}

.wizard__success-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.wizard__btn--wa {
    background: #25D366;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.wizard__btn--wa:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.wizard__btn--close-success {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.25s ease;
}

.wizard__btn--close-success:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* --- STICKY CTA BAR --- */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9000;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.95), rgba(30, 30, 50, 0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(108, 92, 231, 0.2);
    padding: 0.75rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sticky-cta__text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.sticky-cta__text span {
    display: none;
}

.sticky-cta__btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 2px 15px rgba(108, 92, 231, 0.3);
}

.sticky-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.5);
}

.sticky-cta__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.sticky-cta__close:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
    .wizard {
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        margin-top: auto;
    }

    .wizard__header {
        padding: 1.5rem 1.5rem 0;
    }

    .wizard__progress {
        padding: 1rem 1.5rem 0;
    }

    .wizard__body {
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .wizard__options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .wizard__option {
        padding: 0.9rem 0.75rem;
    }

    .wizard__option-icon {
        font-size: 1.5rem;
    }

    .wizard__step-title {
        font-size: 1.15rem;
    }

    .wizard__nav {
        flex-direction: column-reverse;
    }

    .wizard__btn--next,
    .wizard__btn--submit {
        max-width: 100%;
        width: 100%;
    }

    .wizard__btn--prev {
        width: 100%;
        text-align: center;
    }

    .sticky-cta__text span {
        display: none;
    }

    .wizard__success-actions {
        flex-direction: column;
    }

    .wizard__btn--wa,
    .wizard__btn--close-success {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 641px) {
    .sticky-cta__text span {
        display: inline;
    }
}