/* ─── Contenedor ─────────────────────────────────────────── */
.ht-poll {
    padding: 22px 24px;
  margin: 20px 0;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}

.ht-poll::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--ht-poll-accent, #009cc1);
}

/* ─── Header ─────────────────────────────────────────────── */
.ht-poll-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.ht-poll-title {
    margin: 0 0 4px;
    font-size: 1.05em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #005f78;
}

.ht-poll-title::before {
    font-size: 0.9em;
}

.ht-poll-desc {
    margin: 0;
    opacity: 0.65;
    font-size: 0.875em;
    line-height: 1.4;
}

.ht-poll-notice,
.ht-poll-closed {
    opacity: 0.65;
    font-style: italic;
    font-size: 0.9em;
    padding: 10px 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 6px;
    margin: 0;
}

/* ─── Progreso (modo step) ───────────────────────────────── */
.ht-poll-progress {
    margin-bottom: 20px;
}

.ht-poll-progress-text {
    font-size: 0.8em;
    font-weight: 600;
    opacity: 0.55;
    display: block;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ht-poll-progress-bar {
    background: rgba(0,0,0,0.08);
    border-radius: 99px;
    height: 5px;
    overflow: hidden;
}

.ht-poll-progress-fill {
    height: 100%;
    background: var(--ht-poll-accent, #009cc1);
    border-radius: 99px;
    transition: width 0.35s ease;
    width: 0%;
}

/* ─── Pregunta ───────────────────────────────────────────── */
.ht-poll-question--hidden {
    display: none;
}

.ht-poll-question-text {
    font-weight: 600;
    margin: 0 0 14px;
    font-size: 0.975em;
    line-height: 1.45;
    color: #005f78;
}

/* ─── Opciones choice ────────────────────────────────────── */
.ht-poll-options {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ht-poll-options li {
    margin: 0;
}

.ht-poll-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.02);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-size: 0.925em;
    line-height: 1.35;
    user-select: none;
}

.ht-poll-options label:hover {
    border-color: rgba(0,0,0,0.2);
    background: rgba(0,0,0,0.04);
}

/* Radio visual personalizado */
.ht-poll-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    min-width: 17px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.25);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
    display: grid;
    place-content: center;
}

.ht-poll-options input[type="radio"]::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ht-poll-accent, #009cc1);
    transform: scale(0);
    transition: transform 0.15s ease;
}

.ht-poll-options input[type="radio"]:checked {
    border-color: var(--ht-poll-accent, #009cc1);
}

.ht-poll-options input[type="radio"]:checked::after {
    transform: scale(1);
}

.ht-poll-options label:has(input:checked) {
    border-color: var(--ht-poll-accent, #009cc1);
    background: rgba(0,156,193,0.07);
    box-shadow: 0 0 0 3px rgba(0,156,193,0.12);
}

.ht-poll-options label {
    color: #005f78;
}

.ht-poll-options label:has(input:checked) .ht-poll-option-text {
    font-weight: 600;
    color: var(--ht-poll-accent, #009cc1);
}

/* ─── Opciones con imagen ────────────────────────────────── */
.ht-poll-options--images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.ht-poll-options--images li {
    margin: 0;
}

.ht-poll-option--image {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 10px !important;
    cursor: pointer;
    border: 1.5px solid rgba(0,0,0,0.1) !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,0.02) !important;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    text-align: center;
    gap: 7px;
}

.ht-poll-option--image:hover {
    border-color: rgba(0,0,0,0.2) !important;
    background: rgba(0,0,0,0.04) !important;
}

.ht-poll-option--image:has(input:checked) {
    border-color: var(--ht-poll-accent, #009cc1) !important;
    background: rgba(0,156,193,0.07) !important;
    box-shadow: 0 0 0 3px rgba(0,156,193,0.15);
}

.ht-poll-option--image input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ht-poll-option-img {
    object-fit: cover;
    border-radius: 7px;
    display: block;
}

.ht-poll-option-text {
    font-size: 0.82em;
    line-height: 1.3;
}

/* ─── Respuesta abierta ──────────────────────────────────── */
.ht-poll-open-input {
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid rgba(0,0,0,0.12);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.925em;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: rgba(0,0,0,0.02);
    line-height: 1.5;
}

.ht-poll-open-input:focus {
    outline: none;
    border-color: var(--ht-poll-accent, #009cc1);
    box-shadow: 0 0 0 3px rgba(0,156,193,0.12);
    background: #fff;
}

/* ─── Navegación ─────────────────────────────────────────── */
.ht-poll-nav {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.ht-poll-submit--hidden {
    display: none !important;
}

/* ─── Mensaje ────────────────────────────────────────────── */
.ht-poll-msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 0.875em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ht-poll-msg--success {
    background: rgba(0,180,80,0.1);
    color: #005c2a;
    border: 1px solid rgba(0,180,80,0.2);
    text-align: center;
}

.ht-poll-msg--error {
    background: rgba(200,0,0,0.07);
    color: #8b0000;
    border: 1px solid rgba(200,0,0,0.15);
    text-align: center;
}

/* ─── Resultados ─────────────────────────────────────────── */
.ht-poll-results {
    margin-top: 4px;
}

.ht-poll-result-question {
    margin-bottom: 22px;
}

.ht-poll-result-question:last-child {
    margin-bottom: 0;
}

.ht-poll-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ht-poll-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ht-poll-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ht-poll-result-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ht-poll-bar-label {
    font-size: 0.875em;
    font-weight: 500;
    line-height: 1.3;
    color: #005f78;
}

.ht-poll-bar-count {
    font-size: 0.8em;
    opacity: 0.65;
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

.ht-poll-bar-wrap {
    background: rgba(0,0,0,0.07);
    border-radius: 99px;
    height: 10px;
    overflow: hidden;
}

.ht-poll-bar {
    height: 100%;
    background: var(--ht-poll-accent, #009cc1);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
    min-width: 3px;
}

.ht-poll-open-count {
    opacity: 0.65;
    font-size: 0.875em;
    font-style: italic;
}

/* ─── Modo modal ─────────────────────────────────────────── */
.ht-poll--in-modal {
    margin: 0;
    border: none;
    box-shadow: none;
    padding: 4px 0 0;
}

.ht-poll--in-modal::before {
    display: none;
}

.ht-poll--in-modal .ht-poll-header {
    display: none;
}
