/* Copyright (c) Zhmara X. All rights reserved.
   Proprietary and confidential. Unauthorized copying of this file, via any medium, is prohibited. See LICENSE.txt. */

.zx-setup, .zx-pref {
    --zx-primary: #7539FF;
    --zx-primary-soft: #F1EBFF;
    --zx-text: #1F2937;
    --zx-muted: #6B7280;
    --zx-line: #E5E7EB;
    --zx-done: #16A34A;
    color: var(--zx-text);
}

.zx-setup {
    /* Full width up to the max, so the card keeps one size on every step. */
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.zx-setup-head {
    text-align: center;
    margin-bottom: 24px;
}

.zx-setup-head img {
    max-height: 48px;
    margin-bottom: 12px;
}

.zx-setup-head h3 {
    font-weight: 700;
    margin-bottom: 4px;
}

.zx-setup-head p {
    color: var(--zx-muted);
    margin: 0;
}

/* Step bar */
.zx-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    gap: 8px;
}

.zx-steps li {
    flex: 1 1 0;
    text-align: center;
    font-size: 13px;
    color: var(--zx-muted);
    min-width: 0;
}

.zx-steps .zx-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 auto 6px;
    border-radius: 50%;
    border: 2px solid var(--zx-line);
    background: #fff;
    font-weight: 700;
}

.zx-steps li.active { color: var(--zx-primary); font-weight: 600; }
.zx-steps li.active .zx-dot { border-color: var(--zx-primary); background: var(--zx-primary); color: #fff; }
.zx-steps li.done .zx-dot { border-color: var(--zx-done); background: var(--zx-done); color: #fff; }

.zx-steps .zx-step-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Step bar used as tabs (Settings > Preferences) */
.zx-tabs button {
    width: 100%;
    background: none;
    border: 0;
    padding: 4px 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.zx-tabs li:not(.active) button:hover .zx-dot { border-color: var(--zx-primary); color: var(--zx-primary); }
.zx-tabs .zx-dot i { font-size: 14px; }

.zx-pref .zx-hint { color: var(--zx-muted); }

/* Card */
.zx-setup-card {
    background: #fff;
    border: 1px solid var(--zx-line);
    border-radius: 12px;
    padding: 24px;
}

.zx-setup-card h4 {
    font-weight: 700;
    margin-bottom: 4px;
}

.zx-setup-card .zx-hint {
    color: var(--zx-muted);
    margin-bottom: 20px;
}

/* Welcome summary */
:where(.zx-setup) .zx-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

:where(.zx-setup) .zx-summary div {
    border: 1px solid var(--zx-line);
    border-radius: 10px;
    padding: 12px 14px;
}

:where(.zx-setup) .zx-summary small {
    display: block;
    color: var(--zx-muted);
    margin-bottom: 2px;
}

:where(.zx-setup) .zx-summary strong {
    word-break: break-word;
}

/* Preference switches */
.zx-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--zx-line);
}

.zx-switch-row:last-child { border-bottom: 0; }
.zx-switch-row .text-muted { font-size: 12px; }

/* Account rows (Settings > Ledger Configuration) */
.zx-ledger-row select { flex: 0 0 320px; max-width: 320px; }

@media (max-width: 576px) {
    .zx-ledger-row { flex-direction: column; align-items: stretch; }
    .zx-ledger-row select { flex-basis: auto; max-width: none; }
}

.zx-logo-preview {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--zx-line);
    border-radius: 10px;
    padding: 4px;
    background: #fff;
}

/* Footer buttons */
.zx-setup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.zx-setup-actions .zx-skip {
    color: var(--zx-muted);
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
}

.zx-setup-actions .btn-primary {
    background: var(--zx-primary);
    border-color: var(--zx-primary);
}

@media (max-width: 576px) {
    .zx-setup-card { padding: 16px; }
    .zx-steps .zx-step-name { display: none; }
    .zx-steps li.active .zx-step-name { display: block; }
}
