/* ===== Zillesg Voting - Frontend ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.lkv-voting-wrapper {
    --lkv-bg: #1a1118;
    --lkv-card: rgba(45, 28, 36, 0.92);
    --lkv-card-border: rgba(199, 168, 107, 0.12);
    --lkv-gold: #C7A86B;
    --lkv-gold-hover: #d4b87a;
    --lkv-gold-glow: rgba(199, 168, 107, 0.18);
    --lkv-accent: #C7A86B;
    --lkv-accent-hover: #d4b87a;
    --lkv-accent-glow: rgba(199, 168, 107, 0.15);
    --lkv-text: #f0e8dc;
    --lkv-text-secondary: #c4b8a8;
    --lkv-text-muted: #8a7e72;
    --lkv-input-bg: rgba(255, 255, 255, 0.06);
    --lkv-input-border: rgba(199, 168, 107, 0.2);
    --lkv-input-focus: #C7A86B;
    --lkv-radius: 16px;
    --lkv-radius-sm: 10px;
    --lkv-radius-xs: 8px;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.lkv-voting-wrapper *,
.lkv-voting-wrapper *::before,
.lkv-voting-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Card */
.lkv-card {
    width: 100%;
    max-width: 480px;
    background: var(--lkv-card);
    border: 1px solid var(--lkv-card-border);
    border-radius: var(--lkv-radius);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* Header */
.lkv-header {
    margin-bottom: 24px;
}

.lkv-logo {
    max-height: 36px;
    width: auto;
}

/* Intro */
.lkv-intro {
    margin-bottom: 24px;
}

.lkv-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--lkv-text);
    line-height: 1.3;
    margin-bottom: 8px;
}

.lkv-subtitle {
    font-size: 14px;
    color: var(--lkv-text-secondary);
    line-height: 1.5;
}

/* Progress */
.lkv-progress {
    margin-bottom: 24px;
    height: 4px;
    background: var(--lkv-input-bg);
    border-radius: 2px;
    overflow: hidden;
}

.lkv-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lkv-accent), var(--lkv-gold));
    border-radius: 2px;
    width: 25%;
    transition: width 0.4s ease;
}

/* Steps */
.lkv-step {
    display: none;
    animation: lkvFadeIn 0.3s ease;
}

.lkv-step-active {
    display: block;
}

@keyframes lkvFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Header */
.lkv-step-instruction {
    font-size: 13px;
    font-weight: 700;
    color: var(--lkv-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.lkv-step-sub {
    font-size: 13px;
    color: var(--lkv-text-muted);
    margin-bottom: 20px;
}

/* Question */
.lkv-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--lkv-text);
    margin-bottom: 14px;
}

.lkv-required {
    color: var(--lkv-accent);
}

/* Options */
.lkv-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.lkv-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--lkv-input-bg);
    border: 1.5px solid var(--lkv-input-border);
    border-radius: var(--lkv-radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lkv-option:hover {
    border-color: var(--lkv-accent);
    background: rgba(199, 168, 107, 0.08);
}

.lkv-option.lkv-option-selected {
    border-color: var(--lkv-accent);
    background: var(--lkv-accent-glow);
    box-shadow: 0 0 0 1px var(--lkv-accent);
}

.lkv-option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(199, 168, 107, 0.15);
    color: var(--lkv-gold);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
}

.lkv-option-selected .lkv-option-label {
    background: var(--lkv-gold);
    color: #1a1118;
}

.lkv-option-text {
    font-size: 14px;
    color: var(--lkv-text);
    line-height: 1.4;
    font-weight: 500;
}

.lkv-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Step navigation row */
.lkv-step-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

/* Back button */
.lkv-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--lkv-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 0;
    font-family: inherit;
    transition: color 0.2s;
    white-space: nowrap;
}

.lkv-back:hover {
    color: var(--lkv-text);
}

/* Field label */
.lkv-field-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--lkv-text);
    margin-bottom: 10px;
}

/* Input */
.lkv-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--lkv-input-bg);
    border: 1.5px solid var(--lkv-input-border);
    border-radius: var(--lkv-radius-xs);
    color: var(--lkv-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    margin-bottom: 20px;
    outline: none;
}

.lkv-input::placeholder {
    color: var(--lkv-text-muted);
}

.lkv-input:focus {
    border-color: var(--lkv-gold);
    box-shadow: 0 0 0 3px var(--lkv-gold-glow);
}

/* Phone row */
.lkv-phone-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

/* Country selector */
.lkv-country-select {
    position: relative;
    flex-shrink: 0;
}

.lkv-country-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    background: var(--lkv-input-bg);
    border: 1.5px solid var(--lkv-input-border);
    border-radius: var(--lkv-radius-xs);
    color: var(--lkv-text);
    font-size: 22px;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1;
    height: 100%;
}

.lkv-country-btn:hover,
.lkv-country-btn:focus {
    border-color: var(--lkv-gold);
    outline: none;
}

.lkv-country-arrow {
    font-size: 10px;
    color: var(--lkv-text-muted);
}

.lkv-flag {
    display: block;
    border-radius: 2px;
    object-fit: cover;
}

.lkv-country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: var(--lkv-card);
    border: 1.5px solid var(--lkv-input-border);
    border-radius: var(--lkv-radius-xs);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 50;
    list-style: none;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
}

.lkv-country-dropdown.lkv-dropdown-open {
    display: block;
}

.lkv-country-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--lkv-text);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.lkv-country-dropdown li img {
    border-radius: 2px;
    flex-shrink: 0;
}

.lkv-country-dropdown li:hover {
    background: var(--lkv-gold-glow);
}

.lkv-country-dropdown li.lkv-country-active {
    background: var(--lkv-gold-glow);
    font-weight: 600;
}

.lkv-phone-input {
    flex: 1;
    margin-bottom: 0 !important;
}

/* Consent */
.lkv-consent-box {
    background: rgba(199, 168, 107, 0.06);
    border: 1px solid rgba(199, 168, 107, 0.18);
    border-left: 3px solid var(--lkv-gold);
    border-radius: var(--lkv-radius-xs);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.lkv-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--lkv-text-secondary);
    cursor: pointer;
    line-height: 1.6;
}

.lkv-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--lkv-gold);
    flex-shrink: 0;
}

.lkv-terms-trigger {
    color: var(--lkv-gold) !important;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.lkv-terms-trigger:hover {
    opacity: 0.8;
}

/* Terms Modal */
.lkv-terms-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.lkv-terms-modal.lkv-modal-open {
    display: flex;
}

.lkv-terms-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.lkv-terms-modal-content {
    position: relative;
    background: #2d1c24;
    border: 1px solid rgba(199, 168, 107, 0.15);
    border-radius: var(--lkv-radius);
    padding: 28px 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lkvFadeIn 0.25s ease;
}

.lkv-terms-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: var(--lkv-text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.lkv-terms-modal-close:hover {
    color: var(--lkv-text);
}

.lkv-terms-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--lkv-gold);
    margin-bottom: 16px;
    padding-right: 24px;
}

.lkv-terms-modal-body {
    font-size: 13px;
    color: var(--lkv-text-secondary);
    line-height: 1.8;
}

/* Button */
.lkv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--lkv-gold);
    color: #1a1118;
    border: none;
    border-radius: var(--lkv-radius-xs);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.lkv-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.lkv-btn:not(:disabled):hover {
    background: var(--lkv-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--lkv-accent-glow);
}

.lkv-arrow {
    font-size: 16px;
    transition: transform 0.2s;
}

.lkv-btn:not(:disabled):hover .lkv-arrow {
    transform: translateX(3px);
}

/* Confirmation */
.lkv-step-confirmation {
    text-align: center;
    padding: 20px 0;
}

.lkv-confirmation-icon {
    margin-bottom: 20px;
}

.lkv-confirmation-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--lkv-text);
    margin-bottom: 12px;
}

.lkv-confirmation-text {
    font-size: 14px;
    color: var(--lkv-text-secondary);
    line-height: 1.6;
}

.lkv-confirmation-btn-wrap {
    position: relative;
    display: inline-flex;
    margin-top: 24px;
}

.lkv-confirmation-btn {
    display: inline-flex;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.lkv-radar-ring {
    position: absolute;
    inset: 0;
    border-radius: var(--lkv-radius-xs);
    border: 2px solid var(--lkv-gold);
    pointer-events: none;
    opacity: 0;
}

.lkv-radar-ring:nth-child(1) { animation: lkvRadarPing 2.4s ease-out infinite; }
.lkv-radar-ring:nth-child(2) { animation: lkvRadarPing 2.4s ease-out 0.8s infinite; }
.lkv-radar-ring:nth-child(3) { animation: lkvRadarPing 2.4s ease-out 1.6s infinite; }

@keyframes lkvRadarPing {
    0% {
        opacity: 0.65;
        inset: 0;
        border-radius: var(--lkv-radius-xs);
    }
    100% {
        opacity: 0;
        inset: -20px -30px;
        border-radius: calc(var(--lkv-radius-xs) + 8px);
    }
}

/* Loading */
.lkv-loading {
    position: absolute;
    inset: 0;
    background: rgba(26, 17, 24, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--lkv-radius);
}

.lkv-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(199, 168, 107, 0.2);
    border-top-color: var(--lkv-gold);
    border-radius: 50%;
    animation: lkvSpin 0.7s linear infinite;
}

@keyframes lkvSpin {
    to { transform: rotate(360deg); }
}

/* ===== Error ===== */
.lkv-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--lkv-radius-xs);
    padding: 10px 14px;
    font-size: 13px;
    color: #fca5a5;
    margin-bottom: 16px;
    display: none;
}

.lkv-error.lkv-error-visible {
    display: block;
}

/* ===== Splash Screen ===== */
.lkv-splash {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.lkv-splash-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lkv-splash-hint {
    margin-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
    animation: lkvPulse 2s ease-in-out infinite;
}

@keyframes lkvPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.lkv-splash-hiding {
    opacity: 0;
    pointer-events: none;
}

/* ===== Checkbox option style ===== */
.lkv-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--lkv-input-border);
    background: transparent;
    flex-shrink: 0;
    transition: all 0.2s;
    color: transparent;
}

.lkv-option-selected .lkv-option-check {
    background: var(--lkv-gold);
    border-color: var(--lkv-gold);
    color: #1a1118;
}

.lkv-check-icon {
    width: 14px;
    height: 14px;
}

/* ===== Option Groups ===== */
.lkv-option-group,
.lkv-option-group-inline {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lkv-option-group:first-child,
.lkv-option-group-inline:first-child {
    margin-top: 0;
}

.lkv-group-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--lkv-accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--lkv-card-border);
}

.lkv-group-title-sm {
    font-size: 13px;
    font-weight: 700;
    color: var(--lkv-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.lkv-option-note {
    font-size: 12px;
    color: var(--lkv-accent);
    font-style: italic;
    margin-top: -4px;
    margin-bottom: 4px;
    padding-left: 36px;
    line-height: 1.5;
}

/* ===== Single Page Form ===== */
.lkv-single-form .lkv-form-section {
    margin-bottom: 4px;
}

.lkv-single-form .lkv-form-section .lkv-input {
    margin-bottom: 14px;
}

.lkv-single-form .lkv-options {
    margin-bottom: 16px;
}

/* ===== Mobile ===== */
@media (max-width: 520px) {
    .lkv-voting-wrapper {
        padding: 12px;
    }

    .lkv-card {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .lkv-title {
        font-size: 19px;
    }

    .lkv-option {
        padding: 12px 14px;
    }

    .lkv-btn {
        flex: 1;
        justify-content: center;
        padding: 16px;
    }
}
