/* ══════════════════════════════════════════════════
   Wizard — Find & Join a Punto de Conexión
   ══════════════════════════════════════════════════ */

/* Wizard Modal Overlay */
.wizard-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(14, 25, 35, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
}
.wizard-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Wizard Container */
.wizard-container {
    background: var(--bg-dark-lighter);
    border: 1px solid rgba(248,254,97,0.1);
    border-radius: 28px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.wizard-overlay.active .wizard-container {
    transform: translateY(0) scale(1);
}

/* Close Button */
.wizard-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(248,254,97,0.1);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}
.wizard-close:hover {
    background: rgba(248,254,97,0.08);
    color: var(--text-light);
    border-color: rgba(248,254,97,0.2);
}

/* Wizard Header */
.wizard-header {
    padding: 2.5rem 2.5rem 0;
    text-align: center;
}
.wizard-header img {
    height: 50px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px rgba(172,251,85,0.3));
}
.wizard-header h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.wizard-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 2rem 2.5rem 0;
}
.wizard-progress-step {
    display: flex;
    align-items: center;
    gap: 0;
}
.wizard-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(248,254,97,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: var(--bg-dark-lighter);
    flex-shrink: 0;
}
.wizard-progress-dot.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(172,251,85,0.3);
    transform: scale(1.1);
}
.wizard-progress-dot.completed {
    border-color: transparent;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-dark);
}
.wizard-progress-dot.completed i {
    font-size: 0.9rem;
}
.wizard-progress-line {
    width: 50px;
    height: 2px;
    background: rgba(248,254,97,0.1);
    transition: background 0.4s ease;
    flex-shrink: 0;
}
.wizard-progress-line.completed {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

/* Wizard Body */
.wizard-body {
    padding: 2rem 2.5rem 2.5rem;
    position: relative;
    min-height: 320px;
}

/* Step panels */
.wizard-step {
    display: none;
    animation: wizard-step-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.wizard-step.active {
    display: block;
}
@keyframes wizard-step-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.wizard-step.slide-out {
    animation: wizard-step-out 0.3s ease forwards;
}
@keyframes wizard-step-out {
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* Step labels */
.wizard-step-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.wizard-step h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Selection Cards */
.wizard-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(248,254,97,0.08);
    background: rgba(20, 35, 48, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.75rem;
    user-select: none;
}
.wizard-option:hover {
    border-color: rgba(248,254,97,0.2);
    background: rgba(248,254,97,0.04);
    transform: translateX(4px);
}
.wizard-option.selected {
    border-color: rgba(172,251,85,0.4);
    background: rgba(172,251,85,0.08);
    box-shadow: 0 0 20px rgba(172,251,85,0.1);
}
.wizard-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.wizard-option.selected .wizard-option-icon {
    color: var(--bg-dark);
}
.wizard-option-icon.outline {
    background: rgba(248,254,97,0.06);
    color: var(--gradient-start);
}
.wizard-option.selected .wizard-option-icon.outline {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-dark);
}
.wizard-option-content h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}
.wizard-option-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}
.wizard-option-check {
    margin-left: auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(248,254,97,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    color: transparent;
}
.wizard-option.selected .wizard-option-check {
    border-color: transparent;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-dark);
}

/* Wizard Form Inputs */
.wizard-input {
    width: 100%;
    background: rgba(20, 35, 48, 0.6);
    border: 1px solid rgba(248,254,97,0.1);
    border-radius: 12px;
    color: var(--text-light);
    padding: 0.85rem 1.15rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}
.wizard-input:focus {
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(248,254,97,0.1);
}
.wizard-input::placeholder {
    color: rgba(168,184,200,0.5);
}
.wizard-input-group {
    margin-bottom: 1rem;
}
.wizard-input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: block;
}
textarea.wizard-input {
    resize: vertical;
    min-height: 80px;
}
select.wizard-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8b8c8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ── Country-Code Phone Input ───────────────────── */
.wizard-phone-group {
    position: relative;
}
.wizard-phone-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.wizard-cc-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.75rem;
    background: #142330;
    border: 1px solid rgba(248,254,97,0.1);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.wizard-cc-trigger:hover {
    background: #1a2d3d;
    border-color: rgba(248,254,97,0.2);
}
.wizard-cc-trigger:focus {
    outline: none;
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(248,254,97,0.1);
}
.wizard-cc-iso {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gradient-end);
    background: rgba(172,251,85,0.12);
    border: 1px solid rgba(172,251,85,0.2);
    border-radius: 5px;
    padding: 0.15rem 0.35rem;
    line-height: 1.1;
}
.wizard-cc-code {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.1;
}
.wizard-cc-chevron {
    font-size: 0.55rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}
.wizard-cc-trigger.open .wizard-cc-chevron {
    transform: rotate(180deg);
}
.wizard-phone-field {
    border-radius: 0 12px 12px 0 !important;
    flex: 1;
    min-width: 0;
}

/* Dropdown */
.wizard-cc-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 0.35rem;
    background: #15232f;
    border: 1px solid rgba(248,254,97,0.15);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    animation: wizard-cc-drop 0.2s ease;
}
.wizard-cc-dropdown.open {
    display: block;
}
@keyframes wizard-cc-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wizard-cc-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(248,254,97,0.08);
}
.wizard-cc-search-wrap i {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.wizard-cc-search {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}
.wizard-cc-search::placeholder {
    color: rgba(168,184,200,0.45);
}
.wizard-cc-list {
    max-height: 200px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(248,254,97,0.15) transparent;
}
.wizard-cc-list::-webkit-scrollbar {
    width: 5px;
}
.wizard-cc-list::-webkit-scrollbar-thumb {
    background: rgba(248,254,97,0.15);
    border-radius: 4px;
}
.wizard-cc-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: background 0.12s ease;
    font-size: 0.85rem;
}
.wizard-cc-item:hover,
.wizard-cc-item.highlighted {
    background: rgba(248,254,97,0.08);
}
.wizard-cc-item.selected {
    background: rgba(172,251,85,0.14);
}
.wizard-cc-item.selected.highlighted {
    background: rgba(172,251,85,0.2);
}
.wizard-cc-item-iso {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    background: rgba(168,184,200,0.1);
    border-radius: 4px;
    padding: 0.12rem 0.3rem;
    min-width: 26px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.2;
}
.wizard-cc-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light);
}
.wizard-cc-item-code {
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}
.wizard-cc-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Wizard Error Banner */
.wizard-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}
.wizard-error i {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}
.wizard-btn-back {
    background: transparent;
    border: 1px solid rgba(248,254,97,0.15);
    color: var(--text-muted);
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.wizard-btn-back:hover {
    border-color: rgba(248,254,97,0.3);
    color: var(--text-light);
}
.wizard-btn-next {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-dark);
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(172,251,85,0.25);
}
.wizard-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(172,251,85,0.4);
}
.wizard-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success Step */
.wizard-success {
    text-align: center;
    padding: 1rem 0;
}
.wizard-success-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--bg-dark);
    animation: success-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0);
}
@keyframes success-pop {
    to { transform: scale(1); }
}
.wizard-success h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.wizard-success p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

/* Confetti canvas */
.wizard-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

/* Grupo result card in success */
.wizard-result-card {
    background: rgba(20,35,48,0.8);
    border: 1px solid rgba(248,254,97,0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem auto 0;
    max-width: 360px;
    text-align: left;
    animation: fadeInUp 0.5s ease 0.3s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wizard-result-card .result-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.wizard-result-card h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}
.wizard-result-card .result-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.wizard-result-card .result-meta i {
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

/* ── Responsive Wizard ──────────────────────────── */
@media (max-width: 576px) {
    .wizard-container {
        border-radius: 20px;
        max-height: 95vh;
    }
    .wizard-header {
        padding: 2rem 1.5rem 0;
    }
    .wizard-header h3 {
        font-size: 1.25rem;
    }
    .wizard-progress {
        padding: 1.5rem 1.5rem 0;
    }
    .wizard-progress-dot {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    .wizard-progress-line {
        width: 30px;
    }
    .wizard-body {
        padding: 1.5rem;
        min-height: 280px;
    }
    .wizard-option {
        padding: 0.85rem 1rem;
    }
    .wizard-option-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .wizard-nav {
        flex-direction: column-reverse;
    }
    .wizard-nav .wizard-btn-back,
    .wizard-nav .wizard-btn-next {
        width: 100%;
        justify-content: center;
    }
}
