/* ==========================================================================
   FundCollector Setup Wizard Modal
   ========================================================================== */

/* Overlay */
.fc-wizard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fc-wizard-fade-in 0.2s ease;
}

@keyframes fc-wizard-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal card */
.fc-wizard-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    animation: fc-wizard-slide-up 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

@keyframes fc-wizard-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ── */
.fc-wizard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.fc-wizard-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fc-wizard-logo-icon {
    background: #4CAF50;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.fc-wizard-logo-text {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

.fc-wizard-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.fc-wizard-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.fc-wizard-close:hover {
    color: #333;
    background: #f5f5f5;
}

/* ── Progress bar ── */
.fc-wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 4px;
    gap: 0;
    flex-shrink: 0;
}

.fc-wizard-step-dot {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    position: relative;
    cursor: pointer;
    font-family: inherit;
}

.fc-wizard-step-dot:disabled {
    cursor: default;
}

.fc-wizard-step-dot:not(:disabled):hover,
.fc-wizard-step-dot:not(:disabled):focus-visible {
    border-color: #388E3C;
    outline: none;
}

.fc-wizard-dot-check {
    display: none;
}

.fc-wizard-step-dot.active {
    border-color: #4CAF50;
    background: #4CAF50;
    color: #fff;
}

.fc-wizard-step-dot.completed {
    border-color: #4CAF50;
    background: #4CAF50;
    color: #fff;
}

.fc-wizard-step-dot.completed .fc-wizard-dot-num {
    display: none;
}

.fc-wizard-step-dot.completed .fc-wizard-dot-check {
    display: block;
}

.fc-wizard-step-line {
    flex: 1;
    height: 2px;
    background: #d0d0d0;
    min-width: 24px;
    transition: background 0.2s;
}

.fc-wizard-step-line.completed {
    background: #4CAF50;
}

/* Step labels row */
.fc-wizard-step-labels {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px 0;
    flex-shrink: 0;
}

.fc-wizard-step-label {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    flex: 1;
    transition: color 0.2s;
    white-space: nowrap;
}

.fc-wizard-step-label.active,
.fc-wizard-step-label.completed {
    color: #4CAF50;
    font-weight: 600;
}

/* ── Body ── */
.fc-wizard-body {
    padding: 28px 24px 0;
    flex: 1;
    overflow-y: auto;
}

/* Step panels */
.fc-wizard-step {
    display: none;
}

.fc-wizard-step.active {
    display: block;
    animation: fc-wizard-step-in 0.2s ease;
}

@keyframes fc-wizard-step-in {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.fc-wizard-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.fc-wizard-step-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Fields */
.fc-wizard-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fc-wizard-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fc-wizard-field label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-wizard-field input[type="text"],
.fc-wizard-field input[type="email"],
.fc-wizard-field input[type="password"],
.fc-wizard-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    height: auto;
}

.fc-wizard-field input:focus,
.fc-wizard-field select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

.fc-wizard-field-hint {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0;
    line-height: 1.5;
}

.fc-wizard-field-hint a {
    color: #4CAF50;
    text-decoration: none;
}

.fc-wizard-field-hint a:hover {
    text-decoration: underline;
}

.fc-wizard-hint-coming-soon {
    color: #F57C00;
    background: #FFF3E0;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

/* ── Gateway blocks ── */
.fc-wizard-gateway-block {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.15s;
}

.fc-wizard-gateway-block:focus-within {
    border-color: #4CAF50;
}

.fc-wizard-gateway-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-wizard-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    margin: 0 !important;
}

.fc-wizard-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fc-wizard-toggle-track {
    width: 40px;
    height: 22px;
    background: #d0d0d0;
    border-radius: 11px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.fc-wizard-toggle-label input[type="checkbox"]:checked ~ .fc-wizard-toggle-track {
    background: #4CAF50;
}

.fc-wizard-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.fc-wizard-toggle-label input[type="checkbox"]:checked ~ .fc-wizard-toggle-track .fc-wizard-toggle-thumb {
    transform: translateX(18px);
}

.fc-wizard-gateway-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.fc-wizard-gateway-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.fc-wizard-badge-free {
    background: #e8f5e9;
    color: #2e7d32;
}

.fc-wizard-badge-pro {
    background: #e3f2fd;
    color: #1565c0;
}

.fc-wizard-gateway-fields {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

/* ── Done step ── */
.fc-wizard-done-icon {
    font-size: 52px;
    text-align: center;
    margin-bottom: 12px;
}

.fc-wizard-done-hint {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    font-size: 13px;
    color: #3c434a;
    line-height: 1.5;
}

.fc-wizard-done-hint a {
    color: #2271b1;
    text-decoration: underline;
}

.fc-wizard-done-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* ── Footer ── */
.fc-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 24px;
    flex-shrink: 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 24px;
}

/* ── Buttons ── */
.fc-wizard-btn-next,
.fc-wizard-btn-primary {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.fc-wizard-btn-next:hover,
.fc-wizard-btn-primary:hover {
    background: #388E3C;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.35);
    color: #fff;
    text-decoration: none;
}

.fc-wizard-btn-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fc-wizard-btn-skip,
.fc-wizard-btn-secondary {
    background: none;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.fc-wizard-btn-skip:hover,
.fc-wizard-btn-secondary:hover {
    border-color: #999;
    color: #333;
    text-decoration: none;
    background: none;
}

/* Error message */
.fc-wizard-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    color: #c62828;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .fc-wizard-modal {
        max-height: 95vh;
        border-radius: 10px;
    }

    .fc-wizard-step-labels {
        display: none;
    }

    .fc-wizard-footer {
        padding: 16px 20px 20px;
    }

    .fc-wizard-body {
        padding: 20px 20px 0;
    }

    .fc-wizard-header {
        padding: 16px 20px 14px;
    }
}
