/* 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: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    width: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

.poll-container * {
    box-sizing: border-box;
}

.poll-header {
    margin-bottom: 24px;
    flex-shrink: 0;
}

.poll-counter {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: normal;
}

.poll-question {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    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: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    flex-shrink: 0;
    white-space: normal;
}

.poll-option:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.poll-option.selected {
    background: #e7f3ff;
    border-color: #0066cc;
    color: #0066cc;
}

.poll-button {
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
    flex-shrink: 0;
    line-height: 1.4;
    white-space: normal;
}

.poll-button:hover:not(:disabled) {
    background: #0052a3;
}

.poll-button:disabled {
    background: #ccc;
    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: #444;
    line-height: 1.4;
    white-space: normal;
}

.chart-bar-bg {
    background: #e9ecef;
    border-radius: 4px;
    height: 32px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    background: linear-gradient(90deg, #0066cc, #0052a3);
    height: 100%;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    min-width: fit-content;
    line-height: 1;
    white-space: nowrap;
}

.total-votes {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    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: 600;
    color: #222;
    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 #e9ecef;
    flex-shrink: 0;
}

.nav-button {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #444;
    line-height: 1.4;
    white-space: normal;
}

.nav-button:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #dee2e6;
}

.nav-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-indicator {
    font-size: 14px;
    color: #666;
    min-width: 80px;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
