/* === Voter Styles (mobile-first) === */

.voter-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.voter-header {
    background: linear-gradient(135deg, #8b0000, #6b0000);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
}

.voter-header h1 {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 700;
}

.header-title-link {
    color: inherit;
    text-decoration: none;
}

.header-title-link:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* Main content */
.voter-main {
    flex: 1;
    padding: 1.5rem 1rem;
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
}

/* Card layout */
.voter-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.voter-card h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Ticket input */
.ticket-input {
    font-size: 1.5rem;
    text-align: center;
    padding: 0.75rem;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Performance list */
.performance-list {
    list-style: none;
}

.performance-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.performance-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.performance-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.performance-item .radio-circle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.performance-item.selected .radio-circle {
    border-color: var(--primary);
    background: var(--primary);
}

.performance-item.selected .radio-circle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.performance-item .perf-title {
    font-size: 1.05rem;
    font-weight: 500;
}

.performance-item .perf-number {
    font-size: 0.85rem;
    color: var(--gray-500);
    min-width: 24px;
}

/* Performance grid (photo options) */
.performance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.performance-grid-item {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    overflow: hidden;
}

.performance-grid-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.performance-grid-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px var(--primary);
}

.performance-grid-item .perf-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.performance-grid-item .perf-photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-100, #f3f4f6);
    border-radius: 6px;
}

.performance-grid-item .perf-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.performance-grid-item .radio-circle {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.performance-grid-item.selected .radio-circle {
    border-color: var(--primary);
    background: var(--primary);
}

.performance-grid-item.selected .radio-circle::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}

/* Photos hidden state */
.performance-grid.photos-hidden {
    grid-template-columns: 1fr !important;
}

.performance-grid.photos-hidden .perf-photo,
.performance-grid.photos-hidden .perf-photo-placeholder {
    display: none;
}

.performance-grid.photos-hidden .performance-grid-item {
    flex-direction: row;
    padding: 1rem;
    gap: 0.75rem;
}

/* Photo toggle */
.photo-toggle {
    font-size: 0.85rem;
}

/* Vote button */
.vote-btn {
    margin-top: 1rem;
    padding: 0.85rem;
    font-size: 1.1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #8b0000;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.35);
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.vote-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffe44d, #ffc933);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.45);
}

.vote-btn:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    box-shadow: none;
}

/* Closed message */
.voting-closed {
    text-align: center;
    padding: 3rem 1.5rem;
}

.voting-closed h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.voting-closed p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Confirmation step */
.confirm-selection {
    text-align: center;
    padding: 1rem 0;
}

.confirm-selection .selected-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.75rem 0;
}

/* Email form */
.email-form {
    margin-top: 1rem;
}

/* Footer */
.voter-footer {
    text-align: center;
    padding: 1rem;
    color: var(--gray-400);
    font-size: 0.8rem;
}

/* Thank you */
.thankyou-page {
    text-align: center;
    padding: 2rem 0;
}

.thankyou-page h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.thankyou-page .checkmark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: #fff;
}

/* Progress indicator */
.progress-indicator {
    margin-bottom: 1.25rem;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Vote summary (review step) */
.vote-summary {
    margin: 1rem 0;
    text-align: center;
}

.vote-summary-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.vote-summary-question {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.vote-summary-answer {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b0000;
}

.vote-summary-photo {
    text-align: center;
    margin-top: 0.5rem;
}

.vote-summary-photo img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 6px;
    object-fit: cover;
}

/* Responsive */
@media (min-width: 600px) {
    .voter-main {
        padding: 2rem 1rem;
    }

    .voter-card {
        padding: 2rem;
    }
}
