/* Element Micro-Poll Styles */

/* Override theme code block styling */
.poll-container code,
.poll-container pre {
    all: unset !important;
    white-space: normal !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.emp-wrapper {
    all: initial;
    * {
        all: unset;
    }
}

.poll-container {
    all: initial;
    box-sizing:    border-box;
    background:    var(--eg-color-bg, #ffffff);
    border:        1px solid var(--eg-color-border, #E5E7EB);
    border-radius: var(--eg-radius, 16px);
    width:         100%;
    padding:       var(--eg-padding, 30px);
    display:       flex;
    flex-direction: column;
    font-family:   var(--eg-font, 'Rethink Sans', sans-serif);
    overflow:      hidden;
    box-shadow:    var(--eg-shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.poll-container * {
    box-sizing: border-box;
}

.poll-header {
    margin-bottom: 24px;
    flex-shrink: 0;
}

.poll-counter {
    color: #475569;
    font-size: 13px;
    font-family: var(--eg-font-data, 'Space Grotesk', sans-serif);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: normal;
}

.poll-question {
    font-size: 1.125rem;
    font-weight: 800;
    color: #292D6A;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    white-space: normal;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
}

.poll-options::-webkit-scrollbar {
    width: 6px;
}

.poll-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.poll-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.poll-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.poll-option {
    background: var(--eg-color-bg-alt, #F9FAFB);
    border: 2px solid var(--eg-color-border, #E5E7EB);
    border-radius: var(--eg-radius-sm, 8px);
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #0F172A;
    flex-shrink: 0;
    white-space: normal;
}

.poll-option:hover {
    background: #E5E7EB;
    border-color: #94A3B8;
}

.poll-option.selected {
    background: rgba(0, 167, 175, 0.08);
    border-color: #00A7AF;
    color: #048094;
}

.poll-button {
    background: #10ADB4;
    color: white;
    border: none;
    border-radius: var(--eg-radius-pill, 58px);
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 800;
    font-family: var(--eg-font, 'Rethink Sans', sans-serif);
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    line-height: 1.4;
    white-space: normal;
    box-shadow: 0 4px 6px -4px #10ADB4, 0 10px 15px -3px rgba(16, 173, 180, 0.25);
}

.poll-button:hover:not(:disabled) {
    background: #048094;
    box-shadow: 0 4px 12px rgba(4, 128, 148, 0.35);
}

.poll-button:disabled {
    background: #CBD5E1;
    box-shadow: none;
    cursor: not-allowed;
}

.results-view {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.results-view.active {
    display: flex;
}

.chart-container {
    margin: 24px 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
}

.chart-container::-webkit-scrollbar {
    width: 6px;
}

.chart-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chart-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.chart-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.chart-bar {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
}

.chart-bar-bg {
    background: #E5E7EB;
    border-radius: var(--eg-radius-sm, 8px);
    height: 32px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    background: linear-gradient(90deg, #10ADB4, #048094);
    height: 100%;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: white;
    font-weight: 700;
    font-size: 13px;
    min-width: fit-content;
    line-height: 1;
    white-space: nowrap;
}

.total-votes {
    text-align: center;
    color: #475569;
    font-size: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    flex-shrink: 0;
    line-height: 1.4;
    white-space: normal;
}

.question-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.question-view.hidden {
    display: none;
}

.all-results-container {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.all-results-container.active {
    display: flex;
}

.result-question {
    font-size: 16px;
    font-weight: 700;
    color: #292D6A;
    margin-bottom: 16px;
    line-height: 1.4;
    white-space: normal;
}

.results-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
}

.results-content::-webkit-scrollbar {
    width: 6px;
}

.results-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.results-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.results-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.nav-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.nav-button {
    background: var(--eg-color-bg-alt, #F9FAFB);
    border: 2px solid #E5E7EB;
    border-radius: var(--eg-radius-pill, 58px);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--eg-font, 'Rethink Sans', sans-serif);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
    line-height: 1.4;
    white-space: normal;
}

.nav-button:hover:not(:disabled) {
    background: #E5E7EB;
    border-color: #94A3B8;
}

.nav-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-indicator {
    font-size: 14px;
    color: #475569;
    min-width: 80px;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
    font-family: var(--eg-font-data, 'Space Grotesk', sans-serif);
    font-weight: 600;
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
