/**
 * MelonBeat Polls - Frontend Styles
 * Brand Colors: FF6B9D, FF4D85, 2D3436, 1A1A1A, FF5757, FF6C68
 */

/* ========================================
   CSS VARIABLES & BASE
   ======================================== */

:root {
    --mb-poll-primary: #FF6B9D;
    --mb-poll-secondary: #FF4D85;
    --mb-poll-accent: #FF5757;
    --mb-poll-text: #2D3436;
    --mb-poll-dark: #1A1A1A;
    --mb-poll-light: #FF6C68;
    --mb-poll-gradient: linear-gradient(135deg, #FF6B9D 0%, #FF4D85 100%);
    --mb-poll-gradient-accent: linear-gradient(135deg, #FF5757 0%, #FF6C68 100%);
    --mb-poll-shadow: 0 4px 20px rgba(255, 107, 157, 0.2);
    --mb-poll-shadow-hover: 0 8px 30px rgba(255, 107, 157, 0.3);
}

/* ========================================
   POLL CONTAINER - BASE
   ======================================== */

.melonbeat-poll {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    margin: 0 0 24px;
    box-shadow: var(--mb-poll-shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--mb-poll-text);
}

/* Border Radius Variants */
.melonbeat-poll.radius-none { border-radius: 0; }
.melonbeat-poll.radius-small { border-radius: 8px; }
.melonbeat-poll.radius-medium { border-radius: 16px; }
.melonbeat-poll.radius-large { border-radius: 24px; }
.melonbeat-poll.radius-pill { border-radius: 40px; }

/* ========================================
   POLL STYLE VARIANTS
   ======================================== */

/* ----- MODERN (Dark) ----- */
.melonbeat-poll.style-modern {
    background: var(--mb-poll-dark);
    color: #fff;
}

.melonbeat-poll.style-modern .poll-title {
    color: #fff;
}

.melonbeat-poll.style-modern .poll-option-button {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.melonbeat-poll.style-modern .poll-option-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--mb-poll-primary);
}

.melonbeat-poll.style-modern .poll-result {
    background: rgba(255, 255, 255, 0.08);
}

.melonbeat-poll.style-modern .result-info .option-text {
    color: #fff;
}

.melonbeat-poll.style-modern .vote-count {
    color: rgba(255, 255, 255, 0.7);
}

.melonbeat-poll.style-modern .result-bar-container {
    background: rgba(0, 0, 0, 0.3);
}

.melonbeat-poll.style-modern .result-bar {
    background: var(--mb-poll-gradient);
}

.melonbeat-poll.style-modern .result-bar .percentage {
    color: #fff;
}

/* Modern style: 0% percentage text should be white (visible on dark bg) */
.melonbeat-poll.style-modern .result-bar[style*="width: 0%"] .percentage,
.melonbeat-poll.style-modern .result-bar[style*="width:0%"] .percentage {
    color: rgba(255, 255, 255, 0.7);
}

.melonbeat-poll.style-modern .poll-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.melonbeat-poll.style-modern .total-votes {
    color: rgba(255, 255, 255, 0.7);
}

/* ----- MINIMAL (Clean) ----- */
.melonbeat-poll.style-minimal {
    background: transparent;
    box-shadow: none;
    border: 1px solid #e9ecef;
    padding: 20px;
}

.melonbeat-poll.style-minimal .poll-option-button {
    background: #fff;
    border: 2px solid #e9ecef;
}

.melonbeat-poll.style-minimal .poll-option-button:hover {
    border-color: var(--mb-poll-primary);
    background: #fff5f7;
}

.melonbeat-poll.style-minimal .poll-result {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* ----- CARDS (Image Focus) ----- */
.melonbeat-poll.style-cards .poll-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.melonbeat-poll.style-cards .poll-option-button {
    flex-direction: column;
    padding: 16px;
    text-align: center;
}

.melonbeat-poll.style-cards .option-image {
    width: 80px;
    height: 80px;
    margin: 0 0 12px;
    border-radius: 50%;
}

.melonbeat-poll.style-cards .poll-result {
    text-align: center;
}

.melonbeat-poll.style-cards .poll-result .option-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
}

/* ----- BUBBLE (Playful) ----- */
.melonbeat-poll.style-bubble {
    background: linear-gradient(135deg, #fff5f7 0%, #fff0f3 100%);
}

.melonbeat-poll.style-bubble .poll-option-button {
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.1);
}

.melonbeat-poll.style-bubble .poll-option-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.2);
}

.melonbeat-poll.style-bubble .result-bar-container {
    border-radius: 20px;
    overflow: hidden;
}

.melonbeat-poll.style-bubble .result-bar {
    border-radius: 20px;
}

/* ----- K-POP (Vibrant) ----- */
.melonbeat-poll.style-kpop {
    background: var(--mb-poll-dark);
    position: relative;
    overflow: hidden;
}

.melonbeat-poll.style-kpop::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 107, 157, 0.1) 60deg,
        transparent 120deg,
        rgba(255, 87, 87, 0.1) 180deg,
        transparent 240deg,
        rgba(255, 108, 104, 0.1) 300deg,
        transparent 360deg
    );
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.melonbeat-poll.style-kpop .poll-header,
.melonbeat-poll.style-kpop .poll-options,
.melonbeat-poll.style-kpop .poll-footer {
    position: relative;
    z-index: 1;
}

.melonbeat-poll.style-kpop .poll-title {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
}

.melonbeat-poll.style-kpop .poll-option-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.melonbeat-poll.style-kpop .poll-option-button:hover {
    background: rgba(255, 107, 157, 0.3);
    border-color: var(--mb-poll-primary);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
}

.melonbeat-poll.style-kpop .poll-result {
    background: rgba(255, 255, 255, 0.1);
}

.melonbeat-poll.style-kpop .result-info .option-text {
    color: #fff;
}

.melonbeat-poll.style-kpop .vote-count {
    color: rgba(255, 255, 255, 0.7);
}

.melonbeat-poll.style-kpop .result-bar-container {
    background: rgba(0, 0, 0, 0.3);
}

.melonbeat-poll.style-kpop .result-bar {
    background: var(--mb-poll-gradient);
}

.melonbeat-poll.style-kpop .result-bar .percentage {
    color: #fff;
}

/* K-Pop style: 0% percentage text should be white (visible on dark bg) */
.melonbeat-poll.style-kpop .result-bar[style*="width: 0%"] .percentage,
.melonbeat-poll.style-kpop .result-bar[style*="width:0%"] .percentage {
    color: rgba(255, 255, 255, 0.7);
}

.melonbeat-poll.style-kpop .poll-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.melonbeat-poll.style-kpop .total-votes {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   LAYOUT VARIANTS
   ======================================== */

/* Horizontal Layout */
.melonbeat-poll.layout-horizontal .poll-options {
    flex-direction: row;
    flex-wrap: wrap;
}

.melonbeat-poll.layout-horizontal .poll-option {
    flex: 1;
    min-width: 200px;
}

/* Grid Layout */
.melonbeat-poll.layout-grid .poll-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .melonbeat-poll.layout-grid .poll-options {
        grid-template-columns: 1fr;
    }
}

/* Image Grid Layout */
.melonbeat-poll.layout-image-grid .poll-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.melonbeat-poll.layout-image-grid .poll-option-button {
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.melonbeat-poll.layout-image-grid .option-image {
    width: 100%;
    height: 150px;
    margin: 0;
    border-radius: 0;
}

.melonbeat-poll.layout-image-grid .option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.melonbeat-poll.layout-image-grid .option-text {
    padding: 16px;
    text-align: center;
}

/* ========================================
   BUTTON STYLE VARIANTS
   ======================================== */

/* Outline Buttons */
.melonbeat-poll.buttons-outline .poll-option-button {
    background: transparent;
    border: 2px solid var(--mb-poll-primary);
    color: var(--mb-poll-primary);
}

.melonbeat-poll.buttons-outline .poll-option-button:hover {
    background: var(--mb-poll-primary);
    color: #fff;
}

/* Ghost Buttons */
.melonbeat-poll.buttons-ghost .poll-option-button {
    background: transparent;
    border: 1px solid transparent;
    color: var(--mb-poll-text);
}

.melonbeat-poll.buttons-ghost .poll-option-button:hover {
    background: rgba(255, 107, 157, 0.1);
    border-color: var(--mb-poll-primary);
}

/* Pill Buttons */
.melonbeat-poll.buttons-pill .poll-option-button {
    border-radius: 50px;
}

/* ========================================
   PROGRESS BAR VARIANTS
   ======================================== */

/* Square Bars */
.melonbeat-poll.bars-square .result-bar-container,
.melonbeat-poll.bars-square .result-bar {
    border-radius: 0;
}

/* Striped Bars */
.melonbeat-poll.bars-striped .result-bar {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

/* Glow Bars */
.melonbeat-poll.bars-glow .result-bar {
    box-shadow: 0 0 10px var(--mb-poll-primary), 0 0 20px var(--mb-poll-secondary);
}

/* ========================================
   POLL HEADER
   ======================================== */

.poll-header {
    margin-bottom: 24px;
}

.poll-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--mb-poll-dark);
}

.poll-image {
    margin: 0 -28px 20px;
    overflow: hidden;
}

.poll-image img {
    width: 100%;
    height: auto;
    display: block;
}

.poll-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--mb-poll-text);
    margin-bottom: 16px;
}

.poll-meta {
    font-size: 13px;
    color: #888;
}

.poll-meta span {
    margin-right: 12px;
}

/* ========================================
   POLL OPTIONS
   ======================================== */

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.poll-option {
    position: relative;
}

.poll-option-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    font-size: 15px;
    color: var(--mb-poll-text);
    font-weight: 500;
}

.poll-option-button:hover {
    border-color: var(--mb-poll-primary);
    background: #fff5f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
}

.poll-option-button:active {
    transform: translateY(0);
}

.option-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin-right: 16px;
    border-radius: 10px;
    overflow: hidden;
}

.option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-text {
    flex: 1;
}

/* ========================================
   POLL RESULTS
   ======================================== */

.poll-result {
    position: relative;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.poll-result .option-image {
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    margin-bottom: 8px;
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.result-info .option-text {
    font-weight: 600;
    color: var(--mb-poll-dark);
}

.vote-count {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.result-bar-container {
    position: relative;
    height: 36px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.result-bar {
    height: 100%;
    background: var(--mb-poll-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 14px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    box-sizing: border-box;
}

/* Zero percent - no visible bar */
.result-bar[style*="width: 0%"],
.result-bar[style*="width:0%"] {
    padding: 0;
}

.result-bar .percentage {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* Zero percent - position percentage outside the bar */
.result-bar[style*="width: 0%"] .percentage,
.result-bar[style*="width:0%"] .percentage {
    position: absolute;
    left: 10px;
    color: var(--mb-poll-text);
    text-shadow: none;
}

/* 100 percent - ensure full width */
.result-bar[style*="width: 100%"],
.result-bar[style*="width:100%"] {
    width: 100% !important;
}

/* ========================================
   POLL FOOTER
   ======================================== */

.poll-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
}

.total-votes {
    color: #888;
    font-weight: 500;
}

.voted-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mb-poll-gradient);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.voted-badge::before {
    content: '✓';
    font-weight: bold;
}

.view-full-poll {
    color: var(--mb-poll-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.view-full-poll:hover {
    color: var(--mb-poll-secondary);
}

/* ========================================
   POLL STATUS
   ======================================== */

.poll-ended-notice {
    background: linear-gradient(135deg, #fff5f7 0%, #ffeef1 100%);
    color: var(--mb-poll-secondary);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.poll-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 500;
    text-align: center;
}

.poll-message.success {
    background: #d4edda;
    color: #155724;
}

.poll-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   FEATURED POLL - FIXED COLORS
   ======================================== */

.melonbeat-poll.featured-poll {
    background: var(--mb-poll-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.melonbeat-poll.featured-poll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mb-poll-gradient);
    opacity: 0.9;
    pointer-events: none;
}

.melonbeat-poll.featured-poll .poll-header,
.melonbeat-poll.featured-poll .poll-options,
.melonbeat-poll.featured-poll .poll-footer {
    position: relative;
    z-index: 1;
}

.melonbeat-poll.featured-poll .poll-title {
    color: #fff;
    font-size: 26px;
}

.melonbeat-poll.featured-poll .poll-description {
    color: rgba(255, 255, 255, 0.9);
}

.melonbeat-poll.featured-poll .poll-option-button {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.melonbeat-poll.featured-poll .poll-option-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.melonbeat-poll.featured-poll .poll-result {
    background: rgba(255, 255, 255, 0.15);
}

.melonbeat-poll.featured-poll .result-info .option-text {
    color: #fff;
}

.melonbeat-poll.featured-poll .vote-count {
    color: rgba(255, 255, 255, 0.8);
}

.melonbeat-poll.featured-poll .result-bar-container {
    background: rgba(0, 0, 0, 0.25);
}

.melonbeat-poll.featured-poll .result-bar {
    background: #fff;
}

.melonbeat-poll.featured-poll .result-bar .percentage {
    color: var(--mb-poll-dark);
    text-shadow: none;
    font-weight: 700;
}

/* Featured poll: 0% percentage text should be white (visible on dark bg) */
.melonbeat-poll.featured-poll .result-bar[style*="width: 0%"] .percentage,
.melonbeat-poll.featured-poll .result-bar[style*="width:0%"] .percentage {
    color: #fff;
}

.melonbeat-poll.featured-poll .poll-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.melonbeat-poll.featured-poll .total-votes {
    color: rgba(255, 255, 255, 0.85);
}

.melonbeat-poll.featured-poll .view-full-poll {
    color: #fff;
}

.melonbeat-poll.featured-poll .view-full-poll:hover {
    color: rgba(255, 255, 255, 0.85);
}

.featured-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 1;
}

/* ========================================
   POLL CARDS (List View)
   ======================================== */

.melonbeat-polls-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.poll-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poll-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.poll-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.poll-card-image {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: #f0f0f0;
}

.poll-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.poll-card:hover .poll-card-image img {
    transform: scale(1.03);
}

.poll-card-content {
    padding: 20px 24px;
}

.poll-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 14px;
    color: var(--mb-poll-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poll-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #888;
}

.poll-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.poll-status.active {
    background: #d4edda;
    color: #155724;
}

.poll-status.ended {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   INFINITE LOADING
   ======================================== */

/* Hide load more button when infinite scroll is enabled */
.melonbeat-polls-archive[data-infinite-scroll="true"] .melonbeat-polls-load-more {
    display: none;
}

.melonbeat-polls-load-more {
    text-align: center;
    padding: 40px;
}

.melonbeat-polls-load-more button {
    background: var(--mb-poll-gradient);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.melonbeat-polls-load-more button:hover {
    transform: translateY(-2px);
    box-shadow: var(--mb-poll-shadow-hover);
}

.melonbeat-polls-load-more button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.melonbeat-polls-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.melonbeat-polls-loading.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 44px;
    height: 44px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--mb-poll-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   WIDGETS
   ======================================== */

.melonbeat-recent-polls-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-poll-item {
    margin-bottom: 18px;
}

.recent-poll-item:last-child {
    margin-bottom: 0;
}

.recent-poll-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.recent-poll-link:hover {
    opacity: 0.8;
}

.recent-poll-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
}

.recent-poll-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-poll-info {
    flex: 1;
    min-width: 0;
}

.recent-poll-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--mb-poll-dark);
    line-height: 1.4;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-poll-meta {
    display: block;
    font-size: 12px;
    color: #888;
}

.poll-ended-label {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 5px;
}

.view-all-polls {
    display: inline-block;
    margin-top: 20px;
    color: var(--mb-poll-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.view-all-polls:hover {
    color: var(--mb-poll-secondary);
}

/* ========================================
   POLLS ARCHIVE/SHORTCODE CONTAINER
   ======================================== */

.melonbeat-polls-archive {
    width: 100%;
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Slide Animation */
.melonbeat-poll.anim-slide .poll-option {
    animation: slideInUp 0.4s ease forwards;
    opacity: 0;
}

.melonbeat-poll.anim-slide .poll-option:nth-child(1) { animation-delay: 0.05s; }
.melonbeat-poll.anim-slide .poll-option:nth-child(2) { animation-delay: 0.1s; }
.melonbeat-poll.anim-slide .poll-option:nth-child(3) { animation-delay: 0.15s; }
.melonbeat-poll.anim-slide .poll-option:nth-child(4) { animation-delay: 0.2s; }
.melonbeat-poll.anim-slide .poll-option:nth-child(5) { animation-delay: 0.25s; }
.melonbeat-poll.anim-slide .poll-option:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade Animation */
.melonbeat-poll.anim-fade .poll-option {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.melonbeat-poll.anim-fade .poll-option:nth-child(1) { animation-delay: 0.05s; }
.melonbeat-poll.anim-fade .poll-option:nth-child(2) { animation-delay: 0.1s; }
.melonbeat-poll.anim-fade .poll-option:nth-child(3) { animation-delay: 0.15s; }
.melonbeat-poll.anim-fade .poll-option:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Bounce Animation */
.melonbeat-poll.anim-bounce .poll-option {
    animation: bounceIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
.melonbeat-poll.anim-pulse .poll-option-button:hover {
    animation: pulse 0.6s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Card Animation - subtle fade only */
.poll-card {
    animation: fadeIn 0.3s ease forwards;
}

/* Voting Animation */
.poll-option-button.voting {
    opacity: 0.7;
    pointer-events: none;
}

.poll-option-button.voting::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--mb-poll-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .melonbeat-poll {
        padding: 20px;
    }
    
    .poll-title {
        font-size: 20px;
    }
    
    .melonbeat-poll.featured-poll .poll-title {
        font-size: 22px;
    }
    
    .poll-option-button,
    .poll-result {
        padding: 14px 16px;
    }
    
    .option-image {
        width: 42px;
        height: 42px;
    }
    
    .melonbeat-polls-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .poll-card-title {
        font-size: 16px;
    }

    .melonbeat-poll.layout-grid .poll-options,
    .melonbeat-poll.layout-image-grid .poll-options {
        grid-template-columns: 1fr;
    }
    
    .melonbeat-poll.layout-horizontal .poll-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .poll-footer {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }
    
    .result-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.poll-option-button:focus {
    outline: 2px solid var(--mb-poll-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
