/* Board election voting banner */
.election-voting-banner {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.election-voting-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.75rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.election-voting-btn i {
    font-size: 1.1rem;
}

.election-voting-btn:hover,
.election-voting-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.45);
    outline: none;
}

.election-voting-btn.pulse {
    animation: electionVotingPulse 1.8s ease-in-out infinite;
}

.election-voting-btn.pulse:hover,
.election-voting-btn.pulse:focus {
    animation-play-state: paused;
}

@keyframes electionVotingPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55),
                    0 10px 25px rgba(124, 58, 237, 0.35);
    }
    70% {
        transform: scale(1.04);
        box-shadow: 0 0 0 18px rgba(37, 99, 235, 0),
                    0 14px 30px rgba(124, 58, 237, 0.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0),
                    0 10px 25px rgba(124, 58, 237, 0.35);
    }
}

@media (prefers-reduced-motion: reduce) {
    .election-voting-btn.pulse {
        animation: none;
    }
}

@media (max-width: 768px) {
    .election-voting-banner {
        padding: 0 1rem;
    }

    .election-voting-btn {
        width: 100%;
        max-width: 420px;
        justify-content: center;
        white-space: normal;
        text-align: center;
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
        line-height: 1.25;
    }
}

@media (max-width: 480px) {
    .election-voting-btn {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }
}

/* Election voting modal shell */
.timeline-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.timeline-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.timeline-modal {
    background: white;
    border-radius: 18px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.election-voting-modal {
    max-width: 640px;
}

.timeline-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.timeline-modal-header {
    flex-shrink: 0;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.timeline-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem 2rem 2rem;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.timeline-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.timeline-modal-close:hover,
.timeline-modal-close:focus {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    transform: scale(1.1);
}

.timeline-modal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    line-height: 1.3;
}

.election-intro-block {
    background: var(--background-alt, #f7f7fb);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary, #1f2937);
    line-height: 1.5;
}

.election-intro-block p {
    margin: 0 0 0.75rem 0;
}

.election-intro-block p:last-child {
    margin-bottom: 0;
}

.election-deadline-note {
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
}

.election-empty-notice {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #92400e;
    font-weight: 600;
}

.election-position-group {
    margin-bottom: 1.1rem;
}

.election-position-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.election-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    color: var(--text-primary, #1f2937);
}

.election-board-count {
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    font-size: 0.9rem;
}

.election-board-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.election-board-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.election-board-option:hover {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.04);
}

.election-board-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.election-board-selected {
    margin: 0.55rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.election-consent-block {
    background: var(--background-alt, #f7f7fb);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.election-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.election-consent-check input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Submit stays gray and inactive until all officer dropdowns + consent are complete */
.election-voting-modal #electionSubmitBtn:disabled {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #f9fafb !important;
    cursor: not-allowed;
    opacity: 0.75;
    box-shadow: none;
    transform: none;
    pointer-events: none;
}

.election-voting-modal #electionSubmitBtn:disabled:hover,
.election-voting-modal #electionSubmitBtn:disabled:focus {
    background: #9ca3af !important;
    transform: none;
    box-shadow: none;
}

.election-voting-modal #electionSubmitBtn.election-submit-ready:not(:disabled) {
    opacity: 1;
    pointer-events: auto;
}

[data-theme="dark"] .election-voting-modal #electionSubmitBtn:disabled {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .timeline-modal {
    background: #1c1c1e;
}

[data-theme="dark"] .election-intro-block,
[data-theme="dark"] .election-consent-block {
    background: #2a2129;
    border-color: #424245;
    color: #e5e7eb;
}

[data-theme="dark"] .election-select {
    background: #1c1c1e;
    border-color: #424245;
    color: #e5e7eb;
}

[data-theme="dark"] .election-board-option {
    background: #1c1c1e;
    border-color: #424245;
    color: #e5e7eb;
}

[data-theme="dark"] .election-deadline-note,
[data-theme="dark"] .election-board-selected {
    color: #b0b0b0;
}

[data-theme="dark"] .election-empty-notice {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}
