/* Refined CSS for Vote Page with Professional Design */

/* Section Header styled to better match menu bar section headings */
.section-header {
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1px;
}

.section-header h1 {
    font-size: 1rem;  /* Adjusted size to match menu */
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    padding: 0.75rem 1.25rem;
    padding-bottom: 0.75rem;
}

/* Border with proper spacing */
.section-header::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    margin-top: 0.75rem;
}

/* Enhanced container styling */
.resolution-container {
    background-color: white;
    border: 1px solid var(--gray-200);
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Enhanced hover effects - FIXED: Removed translateY transform */
.resolution-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    border-color: var(--gray-300) !important;
}

/* Anti-hover protection for content - FIXED: Preserve necessary borders */
.resolution-container:hover .resolution-content,
.resolution-container:hover .preview-button-container,
.resolution-container:hover .pdf-preview-container {
    box-shadow: none !important;
    transform: none !important;
}

/* Resolution Header - FIXED LAYOUT with consistent positioning */
.resolution-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    transition: background-color 0.2s;
    gap: 1rem;
}

/* Vote icon container - styled like navbar icons */
.vote-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.75rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    grid-column: 1;
}

/* Pending vote icon - document icon with red background */
.vote-icon-container.vote-pending {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* Completed vote icon - vote-yea icon with green background */
.vote-icon-container.vote-completed {
    background-color: var(--success-color);
    border: 2px solid var(--success-color);
}

/* Resolution Status Icon Styling */
.vote-icon-container.status-waiting {
    background-color: #2563eb; /* Blue for waiting */
    border: 2px solid #2563eb;
}

.vote-icon-container.status-progress {
    background-color: var(--warning-color); /* Use consistent warning color */
    border: 2px solid var(--warning-color);
}

.vote-icon-container.status-adopted {
    background-color: var(--success-color); /* Green for adopted */
    border: 2px solid var(--success-color);
}

.vote-icon-container.status-rejected {
    background-color: var(--danger-color); /* Red for rejected */
    border: 2px solid var(--danger-color);
}

/* Title container with timer - RESTRUCTURED FOR CONSISTENT LAYOUT */
.resolution-title-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 2.5rem;
    grid-column: 2;
    overflow: hidden;
}

.resolution-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 0.35rem 0;
}

/* Timer and overview info container - FIXED GRID LAYOUT */
.resolution-time-left {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    font-size: 0.85rem;
    gap: 0.5rem;
}

/* Timer part - FIXED WIDTH to prevent shifting */
.timer-section {
    display: inline-block;
    width: 220px; /* Fixed width for entire timer section */
    white-space: nowrap;
    overflow: visible; /* Allow content to show */
}

/* Status part - AUTO WIDTH for resolution status (different from timer) */
.status-section {
    display: inline-block;
    white-space: nowrap;
    margin-right: 0.5rem; /* Small spacing after status */
}

/* Overview info - SEPARATE CONTAINER with consistent positioning */
.overview-info {
    font-size: 0.75rem;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-info .badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    margin: 0 0.15rem;
    border-radius: 0.25rem;
    display: inline-block;
    vertical-align: middle;
}

.badge-red {
    background-color: var(--danger-color);
    color: white;
}

.badge-green {
    background-color: var(--success-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Toggle button - SAME SIZE AS MENU SECTION */
.toggle-resolution {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    color: var(--secondary-color);
    transition: background-color 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
    grid-column: 3;
}

.toggle-resolution:hover {
    background-color: var(--gray-200);
}

/* Resolution Content */
.resolution-content {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.resolution-details p {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.4;
}

.detail-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-right: 0.5rem;
}

/* Vote Status */
.vote-status-completed {
    color: var(--success-color);
    font-weight: 500;
}

.vote-status-pending {
    color: var(--warning-color);
    font-weight: 500;
}

/* Voting Buttons */
.voting-buttons {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.vote-button-group {
    display: flex;
    gap: 0.75rem;
}

/* Preview Button Container - FIXED: Ensure border is maintained */
.preview-button-container {
    margin-top: 0.75rem;
    border-top: 1px solid var(--gray-200) !important;
    padding-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* PDF Actions - FIXED: Ensure border is maintained */
.pdf-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200) !important;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* STEP 1: Enhanced Preview Button Styling - Consistent across all buttons */
.preview-button {
    background-color: var(--gray-600);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
    min-height: 38px;
    justify-content: center;
    flex-shrink: 0;
}

.preview-button:hover {
    background-color: var(--gray-700);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-button i {
    margin-right: 0.375rem;
    flex-shrink: 0;
}

/* STEP 1: Button visibility states */
.preview-button.show-preview {
    display: inline-flex;
}

.preview-button.hide-on-preview {
    display: inline-flex;
}

.preview-button.show-on-preview {
    display: none;
}

/* STEP 1: When preview is active, toggle button visibility */
.pdf-preview-container.active .preview-button.hide-on-preview {
    display: none;
}

.pdf-preview-container.active .preview-button.show-on-preview {
    display: inline-flex;
}

/* PDF Preview */
.pdf-preview-container {
    margin-top: 0.75rem;
    display: none;
}

.pdf-preview-container.active {
    display: block;
}

/* Countdown timer styling */
.countdown-timer {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-left: 0.25rem; /* Small space after "Pozostały czas:" */
    display: inline-block;
}

.timer-ended {
    color: var(--gray-600);
}

.timer-undefined {
    color: var(--gray-500);
    font-style: italic;
}

/* Results styling for overview */
.result-item {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0.375rem;
    transition: transform 0.2s ease;
}

.result-item:hover {
    transform: translateY(-1px);
}

/* FIXED: Empty State - Now matches resolution container styling */
.empty-state {
    background-color: white;
    padding: 1.5rem;
    text-align: center;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem; /* Added rounded corners to match resolution containers */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Added shadow to match resolution containers */
    margin-bottom: 0.75rem; /* Added consistent margin */
    font-weight: 500;
    font-size: 0.875rem;
}

/* Small button styling for management actions */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
}

/* Ensure proper spacing for action buttons */
.btn + .btn {
    margin-left: 0.5rem;
}

/* Status color utilities */
.text-blue-600 {
    color: #2563eb;
}

.text-yellow-600 {
    color: var(--warning-color); /* Use consistent warning color */
}

/* STEP 1: Responsive Design - Buttons stack vertically on smaller screens */
@media (max-width: 1024px) {
    .vote-button-group {
        flex-wrap: wrap;
    }
    
    .vote-button {
        flex-basis: calc(50% - 0.5rem);
    }
    
    .overview-info {
        font-size: 0.7rem;
    }
    
    .overview-info .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        margin: 0 0.1rem;
    }
    
    .timer-section {
        width: 200px;
    }
    
    .status-section {
        width: auto;
        margin-right: 0.5rem;
    }
    
    /* Stack preview buttons on medium screens if needed */
    .preview-button-container,
    .pdf-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .vote-button-group {
        flex-direction: column;
    }
    
    .vote-button {
        width: 100%;
    }
    
    /* STEP 1: Stack buttons vertically on mobile */
    .preview-button-container,
    .pdf-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .preview-button {
        width: 100%;
        justify-content: center;
    }
    
    /* Make icons smaller on mobile */
    .vote-icon-container {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.5rem;
    }
    
    /* Stack timer and overview info on mobile */
    .resolution-time-left {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .timer-section {
        width: auto;
    }
    
    .overview-info {
        font-size: 0.7rem;
        margin-left: 0;
    }
    
    .overview-info .badge {
        margin: 0.1rem 0.2rem 0.1rem 0;
    }
}

/* ========================================
   RESOLUTION VIEW ENHANCEMENTS - CSS
   New collapsed view layout with improved badges
   ======================================== */

/* Resolution Info Row - Second row in central column */
.resolution-info-row {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--gray-600);
    /* Improved spacing for better badge alignment */
    justify-content: flex-start;
    width: 100%;
}


/* Resolution Status Badge - Main status indicator */
.resolution-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
}

.resolution-status-badge.badge-blue-600 {
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
}

.resolution-status-badge.badge-yellow-600 {
    background-color: var(--warning-color);
    color: white;
    border: 1px solid var(--warning-color);
}

.resolution-status-badge.badge-green-600 {
    background-color: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
}

.resolution-status-badge.badge-red-600 {
    background-color: var(--danger-color);
    color: white;
    border: 1px solid var(--danger-color);
}

/* Participation Info */
.participation-info {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--gray-600);
    white-space: nowrap;
}

/* Share Breakdown Container - DEPRECATED: No longer used as wrapper removed */
/* Individual badges are now direct children of resolution-info-row for proper flex wrapping */
.share-breakdown {
    display: none; /* Hide any remaining instances */
}

/* Share Type Badges - Consistent with users module */
.share-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.share-type-badge.ordinary-shares {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.share-type-badge.preferred-shares {
    background-color: rgba(147, 51, 234, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

/* Vote Type Badges */
.vote-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
}

.vote-type-badge.secret-vote {
    background-color: var(--danger-color);
    color: white;
    border: 1px solid var(--danger-color);
}

.vote-type-badge.public-vote {
    background-color: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
}

/* Voting Method Badges */
.voting-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
}

.voting-method-badge.dual-majority {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.voting-method-badge.standard-voting {
    background-color: rgba(107, 114, 128, 0.1);
    color: #374151;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Resolution Number/Status Badges */
.resolution-number-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
}

.resolution-number-badge.adopted {
    background-color: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
}

.resolution-number-badge.rejected {
    background-color: var(--danger-color);
    color: white;
    border: 1px solid var(--danger-color);
}

/* Participation Badges */
.participation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
}

/* Enhanced Share Type Badges */
.share-type-badge.ordinary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    background-color: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
}

.share-type-badge.preferred-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    background-color: var(--warning-color);
    color: white;
    border: 1px solid var(--warning-color);
}

/* Enhanced Voting Method Badges */
.voting-method-badge.dual-majority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    background-color: var(--danger-color);
    color: white;
    border: 1px solid var(--danger-color);
}

.voting-method-badge.standard-voting-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    background-color: rgba(107, 114, 128, 0.9);
    color: white;
    border: 1px solid #374151;
}

/* Remaining Time Info */
.remaining-time-info {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.countdown-timer {
    font-weight: 500;
    color: var(--warning-color);
}

.countdown-timer.timer-ended {
    color: var(--primary-color);
}

/* ========================================
   RESPONSIVE DESIGN FOR NEW BADGES
   ======================================== */

@media (max-width: 1199px) {
    .resolution-info-row {
        gap: 0.3rem;
        margin-top: 0.375rem;
    }
    
    .resolution-status-badge,
    .share-type-badge,
    .share-type-badge.ordinary-badge,
    .share-type-badge.preferred-badge,
    .vote-type-badge,
    .voting-method-badge,
    .resolution-number-badge,
    .participation-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.35rem;
        gap: 0.2rem;
    }
    
    .participation-info,
    .remaining-time-info {
        font-size: 0.65rem;
    }
    
    /* Share breakdown wrapper no longer used - individual badges are direct children */
}

@media (max-width: 768px) {
    .resolution-info-row {
        gap: 0.25rem;
    }
    
    /* Share breakdown wrapper no longer used - individual badges are direct children */
    
    .resolution-status-badge,
    .share-type-badge,
    .share-type-badge.ordinary-badge,
    .share-type-badge.preferred-badge,
    .vote-type-badge,
    .voting-method-badge,
    .resolution-number-badge,
    .participation-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        gap: 0.2rem;
    }
    
    .participation-info,
    .remaining-time-info {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .resolution-info-row {
        gap: 0.2rem;
    }
    
    /* Maintain consistent badge font sizes even on small screens */
    .resolution-status-badge,
    .share-type-badge,
    .share-type-badge.ordinary-badge,
    .share-type-badge.preferred-badge,
    .vote-type-badge,
    .voting-method-badge,
    .resolution-number-badge,
    .participation-badge,
    .overview-info .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        gap: 0.2rem;
    }
    
    .participation-info,
    .remaining-time-info {
        font-size: 0.55rem;
    }
}

/* Additional CSS for Enhanced Vote Panel - Add to vote.css */

/* Vote Section Headers */
.vote-section-header {
    margin: 1rem 0 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* Enhanced Vote Button Groups */
.vote-button-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Individual Vote Buttons with Labels */
.vote-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    background-color: white;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    text-align: center;
    width: 100%;
    min-height: 80px;
    justify-content: center;
}

.vote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vote-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.vote-button i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.vote-button label {
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    margin: 0;
    cursor: pointer;
    text-align: center;
    width: 100%;
    pointer-events: none;
}

/* Vote Button Colors */
.vote-button-za {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.vote-button-za:hover {
    background-color: #047857;
    border-color: #047857;
}

.vote-button-przeciw {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.vote-button-przeciw:hover {
    background-color: #a0001a;
    border-color: #a0001a;
}

.vote-button-wstrzymuje {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.vote-button-wstrzymuje:hover {
    background-color: #d97706;
    border-color: #d97706;
}

/* Direct vote button specific styles */
.direct-vote-btn {
    position: relative;
    overflow: hidden;
}

.direct-vote-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.direct-vote-btn:hover::before {
    left: 100%;
}

/* Vote Input Fields - Hidden for direct voting */
.vote-input {
    display: none;
}

/* Vote Summary Display - Hidden for direct voting */
.vote-summary {
    display: none;
}

/* Vote Submit Button */
.vote-submit-container {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.vote-submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.vote-submit-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(193, 0, 31, 0.2);
}

.vote-submit-button:active {
    transform: translateY(0);
}

.vote-submit-button:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Primary Vote Submit Button - Full Width Blue */
.vote-submit-button-primary {
    width: 100%;
    background-color: #2563eb; /* Blue-600 to match waiting status */
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.vote-submit-button-primary:hover {
    background-color: #1d4ed8; /* Blue-700 for hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.vote-submit-button-primary:active {
    transform: translateY(0);
    background-color: #1e40af; /* Blue-800 for active */
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.vote-submit-button-primary:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* No Voting Rights Message */
.no-voting-rights {
    padding: 1.5rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    text-align: center;
    color: var(--gray-600);
}

.no-voting-rights p {
    margin-bottom: 0.5rem;
}

.no-voting-rights p:last-child {
    margin-bottom: 0;
}

/* Error State for Vote Groups */
.vote-button-group.error {
    border-color: var(--danger-color) !important;
    background-color: #fef2f2 !important;
}

/* Animation for vote confirmation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.vote-button.voting {
    animation: pulse 0.3s ease-in-out;
    pointer-events: none;
    opacity: 0.8;
}

/* Responsive Design for Vote Panels */
@media (max-width: 768px) {
    .vote-button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .vote-button {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0.75rem;
        min-height: 60px;
        gap: 0.5rem;
    }
    
    .vote-button i {
        font-size: 1.1rem;
        margin-bottom: 0;
        margin-right: 0.375rem;
    }
    
    .vote-submit-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .vote-button {
        min-height: 50px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .vote-button i {
        font-size: 1rem;
    }
    
    .vote-section-header {
        font-size: 0.85rem;
    }
}

/* RVV Input Section Styling */
.rvv-input-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.rvv-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.rvv-code-input {
    width: 120px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    background-color: white;
    color: var(--gray-900);
    letter-spacing: 0.25rem;
    transition: all 0.2s ease;
}

.rvv-code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(193, 0, 31, 0.1);
    transform: scale(1.02);
}

.rvv-code-input::placeholder {
    color: var(--gray-400);
    font-weight: normal;
    letter-spacing: 0.25rem;
}

.rvv-help-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
    line-height: 1.4;
    max-width: 300px;
}

/* Vote section header for RVV */
.rvv-input-section .vote-section-header {
    margin-bottom: 0;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.rvv-input-section .vote-section-header i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .rvv-input-section {
        padding: 0.75rem;
    }

    .rvv-code-input {
        width: 100px;
        height: 50px;
        font-size: 1.25rem;
    }

    .rvv-help-text {
        font-size: 0.8rem;
    }
}

/* ========================================
   ELECTION VOTING STYLES
   Candidate selection interface styling
   ======================================== */

/* Election candidates list container */
.election-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Individual candidate option container */
.candidate-option {
    position: relative;
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: white;
    overflow: hidden;
}

.candidate-option:hover {
    border-color: var(--gray-400);
    background-color: #f9fafb;
}

/* Selected state - Red signature background */
.candidate-option:has(.candidate-checkbox:checked) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.candidate-option:has(.candidate-checkbox:checked):hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Disabled state - grayed out */
.candidate-option:has(.candidate-checkbox:disabled) {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: #f3f4f6;
}

/* Candidate label - clickable area */
.candidate-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    user-select: none;
    width: 100%;
    margin: 0;
}

/* Checkbox styling */
.candidate-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.candidate-checkbox:disabled {
    cursor: not-allowed;
}

/* Candidate number */
.candidate-number {
    font-weight: 600;
    color: var(--gray-700);
    min-width: 1.5rem;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

/* Change text color to white when selected */
.candidate-option:has(.candidate-checkbox:checked) .candidate-number {
    color: white;
}

/* Candidate name */
.candidate-name {
    font-size: 0.95rem;
    color: var(--gray-800);
    flex: 1;
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Change text color to white when selected */
.candidate-option:has(.candidate-checkbox:checked) .candidate-name {
    color: white;
    font-weight: 500;
}

/* Election vote actions container */
.election-vote-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Responsive adjustments for election voting */
@media (max-width: 768px) {
    .candidate-option {
        border-width: 1.5px;
    }

    .candidate-label {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .candidate-checkbox {
        width: 1.1rem;
        height: 1.1rem;
    }

    .candidate-name {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .candidate-label {
        padding: 0.625rem;
    }

    .candidate-name {
        font-size: 0.8rem;
    }

    .candidate-number {
        min-width: 1.25rem;
        font-size: 0.875rem;
    }
}