/* Public voting flow: email -> OTP -> ballot -> payment -> thank you */

.vote-page {
    --vt-dark: #2b2e31;
    --vt-dark-deep: #1f2224;
    --vt-accent: #f9a246;
    --vt-accent-hover: #f08f2a;
    --vt-accent-text: #b45f06;
    --vt-ink: #2b2e31;
    --vt-muted: #5f6368;
    --vt-line: #e4e6e8;
    --vt-soft: #f5f5f5;
    --vt-danger: #c0392b;
    --vt-success: #1e8e5a;

    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
    font-family: "Roboto", -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--vt-ink);
}

.vote-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(160deg, rgba(43, 46, 49, .35), rgba(31, 34, 36, .55)),
        url("../images/Background.jpg") center / cover no-repeat;
}

.vote-page [hidden] {
    display: none !important;
}

/* ---------- Card ---------- */

.vt-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    animation: vt-fade .35s ease-out both;
}

.vt-card--wide {
    max-width: 760px;
}

@keyframes vt-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vt-card__head {
    padding: 26px 28px;
    border-bottom: 4px solid var(--vt-accent);
    border-radius: 18px 18px 0 0;
    background: var(--vt-dark);
    text-align: center;
}

.vt-logo {
    display: inline-block;
    width: 220px;
    max-width: 70%;
    height: auto;
}

.vt-card__body {
    padding: 28px 28px 32px;
}

.vt-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--vt-dark);
    text-align: center;
}

.vt-lead {
    margin: 0 0 24px;
    color: var(--vt-muted);
    text-align: center;
}

.vt-eyebrow {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--vt-accent-text);
    text-align: center;
}

/* ---------- Steps ---------- */

.vt-steps {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 480px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.vt-steps li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .6);
    text-align: center;
}

.vt-steps__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.vt-steps li.is-done .vt-steps__dot {
    border-color: var(--vt-accent);
    background: var(--vt-accent);
    color: var(--vt-dark);
}

.vt-steps li.is-current {
    color: #fff;
}

.vt-steps li.is-current .vt-steps__dot {
    border-color: #fff;
    background: #fff;
    color: var(--vt-dark);
}

/* ---------- Forms ---------- */

.vt-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--vt-ink);
}

.vt-input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--vt-line);
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    color: var(--vt-ink);
    transition: border-color .15s, box-shadow .15s;
}

.vt-input::placeholder {
    color: #9aa5b3;
}

.vt-input:focus {
    outline: none;
    border-color: var(--vt-accent);
    box-shadow: 0 0 0 4px rgba(249, 162, 70, .25);
}

.vt-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--vt-muted);
}

.vt-error {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--vt-danger);
}

.vt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: var(--vt-accent);
    font-size: 16px;
    font-weight: 600;
    color: var(--vt-dark);
    cursor: pointer;
    transition: background-color .15s, box-shadow .15s;
}

.vt-btn:hover,
.vt-btn:focus-visible {
    background: var(--vt-accent-hover);
    color: var(--vt-dark);
    box-shadow: 0 8px 20px rgba(249, 162, 70, .35);
}

.vt-btn:focus-visible {
    outline: 3px solid rgba(43, 46, 49, .55);
    outline-offset: 2px;
}

.vt-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    box-shadow: none;
}

.vt-btn--auto {
    width: auto;
    min-width: 180px;
}

.vt-btn--success {
    background: var(--vt-success);
    color: #fff;
}

.vt-btn--success:hover,
.vt-btn--success:focus-visible {
    background: #17734a;
    color: #fff;
    box-shadow: none;
}

.vt-btn--danger {
    background: var(--vt-danger);
    color: #fff;
}

.vt-btn--danger:hover,
.vt-btn--danger:focus-visible {
    background: #a03024;
    color: #fff;
    box-shadow: none;
}

.vote-page a.vt-link {
    font-weight: 600;
    color: var(--vt-accent-text);
    text-decoration: underline;
    cursor: pointer;
}

.vt-alert {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
}

.vt-alert ul {
    margin: 0;
    padding-left: 18px;
}

.vt-alert--danger {
    background: #fdecea;
    color: #8f2a20;
}

.vt-alert--success {
    background: #e7f6ee;
    color: #17633f;
}

/* ---------- OTP ---------- */

.vt-otp {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.vt-otp .otp-input {
    flex: 1 1 0;
    min-width: 0;
    max-width: 56px;
    height: 60px;
    padding: 0;
    border: 1.5px solid var(--vt-line);
    border-radius: 12px;
    background: var(--vt-soft);
    font-size: 26px;
    font-weight: 700;
    color: var(--vt-dark);
    text-align: center;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.vt-otp .otp-input:focus {
    outline: none;
    border-color: var(--vt-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(249, 162, 70, .25);
}

.vt-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--vt-soft);
    font-size: 28px;
    color: var(--vt-dark);
}

/* ---------- Ballot ---------- */

.vt-voter {
    display: inline-block;
    max-width: 100%;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--vt-soft);
    font-size: 13px;
    color: var(--vt-muted);
    overflow-wrap: anywhere;
}

.vt-category {
    margin: 0 0 28px;
    padding: 0;
    border: 0;
    min-width: 0;
}

.vt-category__title {
    display: flex;
    align-items: center;
    gap: 12px;
    float: none;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--vt-ink);
}

.vt-category__num {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--vt-dark);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.vt-category.is-answered .vt-category__num {
    background: var(--vt-accent);
    color: var(--vt-dark);
}

.vt-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.vt-option {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.vt-option input {
    position: absolute;
    top: 50%;
    left: 22px;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.vt-option__body {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 12px 16px;
    border: 1.5px solid var(--vt-line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.vt-option:hover .vt-option__body {
    border-color: #c4c8cc;
    background: var(--vt-soft);
}

.vt-option__mark {
    flex: none;
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid #c4c8cc;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s, background-color .15s;
}

.vt-option__mark::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 7px;
    width: 5px;
    height: 10px;
    border: solid var(--vt-dark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.vt-option__name {
    font-size: 16px;
    font-weight: 500;
    color: var(--vt-ink);
    overflow-wrap: anywhere;
}

.vt-option input:checked + .vt-option__body {
    border-color: var(--vt-accent);
    background: #fff6ea;
    box-shadow: 0 0 0 1px var(--vt-accent);
}

.vt-option input:checked + .vt-option__body .vt-option__mark {
    border-color: var(--vt-accent);
    background: var(--vt-accent);
}

.vt-option input:checked + .vt-option__body .vt-option__mark::after {
    opacity: 1;
}

.vt-option input:checked + .vt-option__body .vt-option__name {
    font-weight: 700;
    color: var(--vt-dark);
}

.vt-option input:focus-visible + .vt-option__body {
    outline: 3px solid rgba(43, 46, 49, .55);
    outline-offset: 2px;
}

.vt-empty {
    margin: 0;
    font-size: 14px;
    color: var(--vt-muted);
}

.vt-ballot-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    border-top: 1px solid var(--vt-line);
    border-radius: 0 0 18px 18px;
    background: #fff;
}

.vt-progress {
    flex: 1;
    min-width: 0;
}

.vt-progress__text {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--vt-muted);
}

.vt-progress__track {
    height: 6px;
    border-radius: 3px;
    background: var(--vt-line);
    overflow: hidden;
}

.vt-progress__fill {
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: var(--vt-accent);
    transition: width .2s ease-out;
}

/* ---------- Payment ---------- */

.vt-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--vt-soft);
}

.vt-amount__label {
    font-size: 14px;
    color: var(--vt-muted);
}

.vt-amount__value {
    font-size: 26px;
    font-weight: 700;
    color: var(--vt-dark);
    white-space: nowrap;
}

.vt-pay-btn {
    margin-top: 20px;
}

.vt-waiting {
    padding: 8px 0;
    text-align: center;
}

.vt-waiting p {
    margin: 0;
    color: var(--vt-muted);
}

.vt-spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border: 5px solid var(--vt-line);
    border-top-color: var(--vt-accent);
    border-radius: 50%;
    animation: vt-spin .9s linear infinite;
}

@keyframes vt-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Result states / modals ---------- */

.vt-result {
    text-align: center;
}

.vt-result__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fff1de;
    font-size: 44px;
    line-height: 1;
    color: var(--vt-accent);
}

.vt-result__icon--success {
    background: #e7f6ee;
    color: var(--vt-success);
}

.vt-result__icon--danger {
    background: #fdecea;
    color: var(--vt-danger);
}

.vt-result .vt-lead:last-child {
    margin-bottom: 0;
}

.vote-page .modal.show {
    background: rgba(31, 34, 36, .7);
}

.vote-page .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.vote-page .modal-body {
    padding: 32px 28px;
}

/* ---------- Sign-in and password pages ---------- */

.vt-field {
    margin-bottom: 18px;
}

.vt-input.is-invalid {
    border-color: var(--vt-danger);
}

.vt-field__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.vote-page .vt-field__row .vt-link {
    font-size: 13px;
}

.vt-foot {
    margin: 20px 0 0;
    font-size: 12px;
    color: var(--vt-muted);
    text-align: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 575px) {
    .vote-page {
        justify-content: flex-start;
        padding: 20px 12px 32px;
    }

    .vt-card__head {
        padding: 20px;
    }

    .vt-card__body {
        padding: 20px 20px 26px;
    }

    .vt-title {
        font-size: 21px;
    }

    .vt-options {
        grid-template-columns: 1fr;
    }

    .vt-ballot-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 20px;
    }

    .vt-btn--auto {
        width: 100%;
    }

    .vt-otp {
        gap: 6px;
    }

    .vt-otp .otp-input {
        height: 54px;
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vt-card,
    .vt-spinner {
        animation-duration: .01ms;
    }
}
