/**
 * HEM Interaction — Frontend Styles
 *
 * Uses CSS custom properties from hem-theme where available:
 *   --hem-primary, --hem-primary-dark, --hem-text, --hem-bg, --hem-border, --hem-radius
 */

:root {
    --hem-primary: #0073aa;
    --hem-primary-dark: #005a87;
    --hem-text: #333;
    --hem-text-light: #666;
    --hem-bg: #fff;
    --hem-bg-alt: #f7f7f7;
    --hem-border: #ddd;
    --hem-radius: 6px;
    --hem-success: #00a32a;
    --hem-danger: #d63638;
    --hem-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =====================================================================
   SHARED PANEL STYLES
   ===================================================================== */

.hem-panel {
    background: var(--hem-bg);
    border: 1px solid var(--hem-border);
    border-radius: var(--hem-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    color: var(--hem-text);
}

.hem-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--hem-bg-alt);
    border-bottom: 1px solid var(--hem-border);
    font-weight: 600;
    font-size: 15px;
}

.hem-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.hem-panel__footer {
    padding: 12px 16px;
    border-top: 1px solid var(--hem-border);
    background: var(--hem-bg-alt);
}

.hem-panel__empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--hem-text-light);
    font-style: italic;
}

/* =====================================================================
   CHAT PANEL
   ===================================================================== */

.hem-chat {
    max-height: 500px;
}

.hem-chat__messages {
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
}

.hem-chat__message {
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    transition: background 0.2s;
}

.hem-chat__message:hover {
    background: var(--hem-bg-alt);
}

.hem-chat__message--pinned {
    background: #fffde7;
    border-left: 3px solid #ffc107;
}

.hem-chat__message--pending {
    opacity: 0.5;
}

.hem-chat__avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hem-border);
    overflow: hidden;
}

.hem-chat__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hem-chat__content {
    flex: 1;
    min-width: 0;
}

.hem-chat__author {
    font-weight: 600;
    font-size: 13px;
    color: var(--hem-primary);
    margin-right: 6px;
}

.hem-chat__time {
    font-size: 11px;
    color: var(--hem-text-light);
}

.hem-chat__text {
    margin-top: 2px;
    word-wrap: break-word;
    line-height: 1.4;
}

.hem-chat__pin-badge {
    display: inline-block;
    font-size: 11px;
    background: #ffc107;
    color: #333;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 6px;
}

.hem-chat__actions {
    display: none;
    flex-shrink: 0;
    gap: 4px;
    align-items: center;
}

.hem-chat__message:hover .hem-chat__actions {
    display: flex;
}

.hem-chat__actions button {
    background: none;
    border: 1px solid var(--hem-border);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
    color: var(--hem-text-light);
    transition: all 0.2s;
}

.hem-chat__actions button:hover {
    background: var(--hem-bg-alt);
    color: var(--hem-text);
}

.hem-chat__actions .hem-btn-delete:hover {
    background: var(--hem-danger);
    color: #fff;
    border-color: var(--hem-danger);
}

/* Chat input */
.hem-chat__input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hem-chat__input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--hem-border);
    border-radius: var(--hem-radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.hem-chat__input input:focus {
    border-color: var(--hem-primary);
}

.hem-chat__input button {
    padding: 8px 16px;
    background: var(--hem-primary);
    color: #fff;
    border: none;
    border-radius: var(--hem-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.hem-chat__input button:hover {
    background: var(--hem-primary-dark);
}

.hem-chat__input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hem-chat__rate-limit {
    font-size: 12px;
    color: var(--hem-danger);
    margin-top: 4px;
    display: none;
}

.hem-chat__rate-limit.visible {
    display: block;
}

/* =====================================================================
   Q&A PANEL
   ===================================================================== */

.hem-qa__sort {
    display: flex;
    gap: 8px;
}

.hem-qa__sort-btn {
    padding: 4px 10px;
    border: 1px solid var(--hem-border);
    border-radius: var(--hem-radius);
    background: var(--hem-bg);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--hem-text-light);
}

.hem-qa__sort-btn.active {
    background: var(--hem-primary);
    color: #fff;
    border-color: var(--hem-primary);
}

.hem-qa__questions {
    padding: 0;
}

.hem-qa__question {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--hem-border);
    transition: background 0.2s;
}

.hem-qa__question:last-child {
    border-bottom: none;
}

.hem-qa__question:hover {
    background: var(--hem-bg-alt);
}

.hem-qa__question--pinned {
    background: #fffde7;
    border-left: 3px solid #ffc107;
}

.hem-qa__question--answered {
    border-left: 3px solid var(--hem-success);
}

.hem-qa__vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 40px;
}

.hem-qa__vote-btn {
    background: none;
    border: 1px solid var(--hem-border);
    border-radius: var(--hem-radius);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    color: var(--hem-text-light);
}

.hem-qa__vote-btn:hover,
.hem-qa__vote-btn.voted {
    background: var(--hem-primary);
    color: #fff;
    border-color: var(--hem-primary);
}

.hem-qa__vote-count {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--hem-text);
}

.hem-qa__body {
    flex: 1;
    min-width: 0;
}

.hem-qa__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}

.hem-qa__author {
    font-weight: 600;
    font-size: 13px;
    color: var(--hem-primary);
}

.hem-qa__timestamp {
    font-size: 11px;
    color: var(--hem-text-light);
}

.hem-qa__text {
    line-height: 1.5;
    word-wrap: break-word;
}

.hem-qa__answer {
    margin-top: 8px;
    padding: 8px 12px;
    background: #e8f5e9;
    border-radius: var(--hem-radius);
    border-left: 3px solid var(--hem-success);
}

.hem-qa__answer-label {
    font-weight: 600;
    font-size: 12px;
    color: var(--hem-success);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.hem-qa__answer-text {
    font-size: 13px;
    line-height: 1.4;
}

.hem-qa__mod-actions {
    display: none;
    margin-top: 6px;
    gap: 6px;
}

.hem-qa__question:hover .hem-qa__mod-actions {
    display: flex;
}

.hem-qa__mod-actions button {
    padding: 3px 8px;
    border: 1px solid var(--hem-border);
    border-radius: 3px;
    background: var(--hem-bg);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--hem-text-light);
}

.hem-qa__mod-actions button:hover {
    background: var(--hem-primary);
    color: #fff;
    border-color: var(--hem-primary);
}

/* Q&A input */
.hem-qa__submit {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hem-qa__submit textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--hem-border);
    border-radius: var(--hem-radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.hem-qa__submit textarea:focus {
    border-color: var(--hem-primary);
}

.hem-qa__submit button {
    align-self: flex-end;
    padding: 8px 16px;
    background: var(--hem-primary);
    color: #fff;
    border: none;
    border-radius: var(--hem-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hem-qa__submit button:hover {
    background: var(--hem-primary-dark);
}

/* =====================================================================
   POLL PANEL
   ===================================================================== */

.hem-poll__question {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--hem-border);
}

.hem-poll__timer {
    text-align: center;
    padding: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--hem-danger);
    font-variant-numeric: tabular-nums;
}

.hem-poll__options {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hem-poll__option {
    position: relative;
    border: 2px solid var(--hem-border);
    border-radius: var(--hem-radius);
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    background: var(--hem-bg);
}

.hem-poll__option:hover {
    border-color: var(--hem-primary);
}

.hem-poll__option.selected {
    border-color: var(--hem-primary);
    background: #e7f5fe;
}

.hem-poll__option.disabled {
    cursor: default;
    opacity: 0.8;
}

.hem-poll__option-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 115, 170, 0.1);
    transition: width 0.6s ease;
    width: 0;
    z-index: 0;
}

.hem-poll__option-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hem-poll__option-text {
    font-weight: 500;
}

.hem-poll__option-percent {
    font-weight: 700;
    font-size: 15px;
    color: var(--hem-primary);
    display: none;
}

.hem-poll__option.show-results .hem-poll__option-percent {
    display: inline;
}

.hem-poll__option-count {
    font-size: 12px;
    color: var(--hem-text-light);
    margin-left: 4px;
    display: none;
}

.hem-poll__option.show-results .hem-poll__option-count {
    display: inline;
}

.hem-poll__voted-msg {
    text-align: center;
    padding: 12px;
    font-size: 13px;
    color: var(--hem-text-light);
    font-style: italic;
}

.hem-poll__total {
    text-align: center;
    padding: 8px 16px 16px;
    font-size: 13px;
    color: var(--hem-text-light);
}

.hem-poll__no-poll {
    padding: 40px 16px;
    text-align: center;
    color: var(--hem-text-light);
}

/* =====================================================================
   REACTION BAR
   ===================================================================== */

.hem-reactions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: var(--hem-bg);
    border-radius: 30px;
    box-shadow: var(--hem-shadow);
    border: 1px solid var(--hem-border);
    z-index: 9999;
    align-items: center;
}

.hem-reactions__btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hem-reactions__btn:hover {
    background: var(--hem-bg-alt);
    transform: scale(1.2);
}

.hem-reactions__btn:active {
    transform: scale(0.9);
}

.hem-reactions__btn.cooldown {
    opacity: 0.4;
    cursor: not-allowed;
}

.hem-reactions__count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--hem-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s;
}

.hem-reactions__count.visible {
    opacity: 1;
    transform: scale(1);
}

.hem-reactions__separator {
    width: 1px;
    height: 28px;
    background: var(--hem-border);
    margin: 0 4px;
}

/* Raise hand button */
.hem-reactions__hand {
    width: 40px;
    height: 40px;
    border: 2px solid var(--hem-border);
    background: var(--hem-bg);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hem-reactions__hand:hover {
    border-color: var(--hem-primary);
}

.hem-reactions__hand.raised {
    background: var(--hem-primary);
    border-color: var(--hem-primary);
    animation: hem-hand-pulse 1.5s ease infinite;
}

@keyframes hem-hand-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(0, 115, 170, 0); }
}

.hem-reactions__hand-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--hem-text-light);
    margin-left: 4px;
}

/* Reaction burst animation */
.hem-reaction-burst {
    position: fixed;
    font-size: 28px;
    pointer-events: none;
    z-index: 99999;
    animation: hem-burst-float 1.5s ease-out forwards;
}

@keyframes hem-burst-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.5);
    }
}

/* =====================================================================
   CTA STYLES
   ===================================================================== */

/* Banner (top bar) */
.hem-cta-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: var(--hem-primary);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: hem-cta-slide-down 0.4s ease;
}

@keyframes hem-cta-slide-down {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.hem-cta-banner__title {
    font-weight: 700;
    font-size: 15px;
}

.hem-cta-banner__description {
    font-size: 14px;
    opacity: 0.9;
}

.hem-cta-banner__btn {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    color: var(--hem-primary);
    border-radius: var(--hem-radius);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.hem-cta-banner__btn:hover {
    background: #f0f0f0;
    color: var(--hem-primary-dark);
}

.hem-cta-banner__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.hem-cta-banner__close:hover {
    opacity: 1;
}

/* Overlay (modal) */
.hem-cta-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    animation: hem-cta-fade-in 0.3s ease;
}

@keyframes hem-cta-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hem-cta-overlay__card {
    background: var(--hem-bg);
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: hem-cta-scale-in 0.3s ease;
    position: relative;
}

@keyframes hem-cta-scale-in {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.hem-cta-overlay__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--hem-text-light);
    transition: color 0.2s;
    line-height: 1;
}

.hem-cta-overlay__close:hover {
    color: var(--hem-text);
}

.hem-cta-overlay__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--hem-text);
}

.hem-cta-overlay__description {
    font-size: 15px;
    color: var(--hem-text-light);
    margin: 0 0 20px;
    line-height: 1.5;
}

.hem-cta-overlay__btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--hem-primary);
    color: #fff;
    border-radius: var(--hem-radius);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s;
}

.hem-cta-overlay__btn:hover {
    background: var(--hem-primary-dark);
    color: #fff;
}

/* Floating button */
.hem-cta-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99997;
    animation: hem-cta-bounce-in 0.5s ease;
}

@keyframes hem-cta-bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hem-cta-button__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--hem-primary);
    color: #fff;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: var(--hem-shadow);
    transition: all 0.2s;
}

.hem-cta-button__link:hover {
    background: var(--hem-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hem-cta-button__close {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.hem-cta-button__close:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* =====================================================================
   EMBEDDED INTERACTION (event page grid columns)
   ===================================================================== */

/* Make grid columns stretch to equal height when interaction is present */
.ep-grid:has(.hem-interaction--embedded) {
    align-items: stretch;
}

.ep-grid__col:has(.hem-interaction--embedded) {
    display: flex;
    flex-direction: column;
}

.hem-interaction--embedded {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hem-interaction--embedded .hem-interaction-sidebar {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Tabs ── */
.hem-interaction--embedded .hem-interaction-tabs {
    flex-shrink: 0;
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    gap: 0;
}

.hem-interaction--embedded .hem-interaction-tab {
    flex: 1;
    padding: 11px 16px;
    font-size: 14px;
    text-align: center;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #9ca3af;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    letter-spacing: -0.01em;
}

.hem-interaction--embedded .hem-interaction-tab:hover {
    color: #6b7280;
}

.hem-interaction--embedded .hem-interaction-tab.active {
    color: var(--event-color, var(--hem-primary, #2563eb));
    border-bottom-color: var(--event-color, var(--hem-primary, #2563eb));
    background: #fff;
}

/* ── Panel visibility (tab switching) ── */
.hem-interaction--embedded .hem-panel {
    display: none;
    border: none;
    border-radius: 0;
    max-height: none;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    font-size: 14px;
}

.hem-interaction--embedded .hem-panel.hem-panel--active {
    display: flex;
}

/* When only one panel exists (no tabs), always show it */
.hem-interaction--embedded .hem-interaction-sidebar > .hem-panel:only-of-type {
    display: flex;
}

/* ── Hide panel headers when embedded (tabs replace them) ── */
.hem-interaction--embedded .hem-panel__header {
    display: none;
}

/* ── Chat panel ── */
.hem-interaction--embedded .hem-chat {
    max-height: none;
}

.hem-interaction--embedded .hem-chat__messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.hem-interaction--embedded .hem-panel__empty {
    padding: 48px 24px;
    font-size: 14px;
    color: #9ca3af;
    font-style: normal;
}

.hem-interaction--embedded .hem-panel__footer {
    flex-shrink: 0;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 12px 16px;
}

.hem-interaction--embedded .hem-chat__input input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    background: #fff;
}

.hem-interaction--embedded .hem-chat__input input:focus {
    border-color: var(--event-color, var(--hem-primary, #2563eb));
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hem-interaction--embedded .hem-chat__input button {
    background: var(--event-color, var(--hem-primary, #2563eb));
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Q&A panel ── */
.hem-interaction--embedded .hem-qa__sort-btn {
    border-radius: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid #e5e7eb;
}

.hem-interaction--embedded .hem-qa__sort-btn.active {
    background: var(--event-color, var(--hem-primary, #2563eb));
    border-color: var(--event-color, var(--hem-primary, #2563eb));
}

.hem-interaction--embedded .hem-qa__questions {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.hem-interaction--embedded .hem-qa__submit textarea {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    resize: none;
    min-height: 56px;
}

.hem-interaction--embedded .hem-qa__submit textarea:focus {
    border-color: var(--event-color, var(--hem-primary, #2563eb));
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hem-interaction--embedded .hem-qa__submit button {
    background: var(--event-color, var(--hem-primary, #2563eb));
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
}

.hem-interaction--embedded .hem-qa__vote-btn:hover,
.hem-interaction--embedded .hem-qa__vote-btn.voted {
    background: var(--event-color, var(--hem-primary, #2563eb));
    border-color: var(--event-color, var(--hem-primary, #2563eb));
}

/* ── Poll panel ── */
.hem-interaction--embedded .hem-poll__option.selected {
    border-color: var(--event-color, var(--hem-primary, #2563eb));
}

.hem-interaction--embedded .hem-poll__option-percent {
    color: var(--event-color, var(--hem-primary, #2563eb));
}

/* ── Hide reactions bar when embedded ── */
.hem-interaction--embedded .hem-reactions-bar {
    display: none;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 768px) {
    .hem-interaction--embedded .hem-interaction-sidebar {
        max-height: 400px;
        border-radius: 8px;
    }

    .hem-interaction--embedded .hem-interaction-tab {
        padding: 9px 12px;
        font-size: 13px;
    }

    .hem-panel {
        max-height: 400px;
        border-radius: 0;
    }

    .hem-reactions {
        bottom: 10px;
        right: 10px;
        left: 10px;
        justify-content: center;
        border-radius: 20px;
        padding: 6px 10px;
    }

    .hem-reactions__btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .hem-cta-banner {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 8px;
    }

    .hem-cta-overlay__card {
        padding: 24px;
        margin: 16px;
    }

    .hem-cta-overlay__title {
        font-size: 18px;
    }

    .hem-cta-button {
        bottom: 70px;
        right: 10px;
    }

    .hem-qa__question {
        padding: 10px 12px;
    }

    .hem-chat__message {
        padding: 6px 12px;
    }

    .hem-poll__options {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .hem-reactions__btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .hem-reactions__hand {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
