/**
 * Council Voting Visualization Styles
 * File: assets/css/council-voting-visualization.css
 * Version: 1.1.0 - Hemicycle removed, responsive fixes, improved tooltips
 */

/* Container and Card */
.council-voting-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.council-voting-container *,
.council-voting-container *::before,
.council-voting-container *::after {
    box-sizing: border-box;
}

.voting-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    animation: cvs-slideUp 0.6s ease-out;
    overflow: hidden;
}

@keyframes cvs-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.voting-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.voting-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.voting-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}

.result-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-accepted {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.result-rejected {
    background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
    color: white;
}

.result-retracted {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
}

/* Visualizations Container - Donut Only */
.visualizations-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

/* Donut Chart Container */
.donut-container {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.donut-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.donut-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.percentage-large {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.vote-label-center {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Statistics Container */
.stats-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-box {
    flex: 0 1 200px;
    min-width: 150px;
}

.stat-box {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.stat-number.voor-color {
    color: #10b981;
}

.stat-number.tegen-color {
    color: #f43f5e;
}

.stat-number.afwezig-color {
    color: #94a3b8;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-percentage {
    font-size: 1.125rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Party Cards Grid */
.parties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.party-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.party-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.party-card.highlighted {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.party-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.party-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.party-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    line-height: 1.2;
}

.party-seats {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

.party-votes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vote-chip {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.chip-voor {
    background: #d1fae5;
    color: #065f46;
}

.chip-tegen {
    background: #fee2e2;
    color: #991b1b;
}

.chip-afwezig {
    background: #f3f4f6;
    color: #6b7280;
}

/* Legend */
.voting-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.legend-color.voor-gradient {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-color.tegen-gradient {
    background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
}

.legend-color.afwezig-gradient {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.legend-label {
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

/* Tooltip - FIXED positioning */
.voting-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 280px;
    width: max-content;
}

.voting-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-members {
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.tooltip-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.75rem;
}

.member-name {
    flex: 1;
    opacity: 0.9;
}

.member-vote {
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.member-vote.voor {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.member-vote.tegen {
    background: rgba(244, 63, 94, 0.2);
    color: #fca5a5;
}

.member-vote.afwezig {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

/* Retracted Notice */
.retracted-notice {
    text-align: center;
    padding: 1.5rem;
    background: #f3f4f6;
    border-radius: 16px;
    font-size: 1rem;
    color: #475569;
    margin: 2rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stat-box {
        flex: 0 1 180px;
    }
}

@media (max-width: 768px) {
    .council-voting-container {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }

    .voting-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .voting-title {
        font-size: 1.5rem;
    }

    .voting-subtitle {
        font-size: 0.875rem;
    }

    .donut-container {
        padding: 1.5rem;
    }

    .donut-wrapper {
        max-width: 260px;
    }

    .parties-grid {
        grid-template-columns: 1fr;
    }

    .voting-legend {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .stat-box {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-percentage {
        font-size: 0.875rem;
    }

    /* Tooltip adjustments for mobile */
    .voting-tooltip {
        max-width: calc(100vw - 2rem);
        font-size: 0.8rem;
    }

    .tooltip-members {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .council-voting-container {
        padding: 0 0.5rem;
    }

    .voting-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .voting-header {
        margin-bottom: 1.5rem;
    }

    .voting-title {
        font-size: 1.25rem;
    }

    .visualizations-container {
        margin-bottom: 1.5rem;
    }

    .donut-container {
        padding: 1rem;
        border-radius: 12px;
    }

    .donut-wrapper {
        max-width: 220px;
    }

    .stats-container {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .stat-box {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 120px;
        padding: 0.75rem;
        border-radius: 12px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .parties-grid {
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .party-card {
        padding: 0.75rem;
    }

    .voting-legend {
        margin-top: 1.5rem;
        padding-top: 1rem;
        gap: 0.75rem;
    }

    .legend-color {
        width: 20px;
        height: 20px;
    }

    .legend-label {
        font-size: 0.75rem;
    }
}

/* Error Messages */
.council-vote-error {
    padding: 1rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    text-align: center;
    margin: 1rem 0;
}

/* Prevent overflow */
.raad-stemming-container {
    overflow: visible;
}