.poll-composer {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #dfe6da;
    border-radius: 14px;
    background: #f8fbf6;
}

.poll-composer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.poll-composer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #273522;
    font-size: 0.95rem;
    font-weight: 700;
}

.poll-composer-title i {
    color: #6fbd36;
}

.poll-composer-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #697265;
    cursor: pointer;
}

.poll-composer-close:hover {
    background: #e9f0e4;
    color: #273522;
}

.poll-composer-question,
.poll-composer-option,
.poll-composer-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd8ca;
    border-radius: 10px;
    background: #fff;
    color: #222b1f;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.poll-composer-question,
.poll-composer-option {
    padding: 10px 12px;
}

.poll-composer-question:focus,
.poll-composer-option:focus,
.poll-composer-select:focus {
    border-color: #81d742;
    box-shadow: 0 0 0 3px rgba(129, 215, 66, 0.16);
}

.poll-composer-options {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.poll-composer-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.poll-composer-remove-option {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8a9386;
    cursor: pointer;
}

.poll-composer-remove-option:hover {
    background: #fde9e7;
    color: #c0392b;
}

.poll-composer-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.poll-composer-add {
    border: 0;
    background: transparent;
    color: #579d26;
    font-weight: 700;
    cursor: pointer;
    padding: 7px 2px;
}

.poll-composer-add:disabled {
    color: #a9b0a5;
    cursor: not-allowed;
}

.poll-composer-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4f5a4b;
    font-size: 0.88rem;
    cursor: pointer;
}

.poll-composer-check input {
    accent-color: #72c239;
}

.poll-composer-select {
    width: auto;
    min-width: 145px;
    padding: 8px 30px 8px 10px;
    margin-left: auto;
}

.composer-tool.is-active,
.modal-composer-tool.is-active {
    background: rgba(129, 215, 66, 0.14);
    color: #65b52f;
}

.post-poll {
    margin: 14px 0px 18px;
    padding: 12px;
    border: 1px solid #dce6d6;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdf9 0%, #f5f9f2 100%);
}

.post-content .post-poll {
    margin-right: 0;
    margin-left: 0;
}

.post-poll-heading h4 {
    margin: 7px 0 13px;
    color: #24301f;
    font-size: 1rem;
    line-height: 1.4;
}

.post-poll-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5eaa2b;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.post-poll-options {
    display: grid;
    gap: 8px;
}

.post-poll-option {
    position: relative;
    width: 100%;
    min-height: 43px;
    overflow: hidden;
    border: 1px solid #d5ddd0;
    border-radius: 11px;
    background: #fff;
    color: #34402f;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.post-poll-option:hover:not(:disabled) {
    border-color: #81d742;
    box-shadow: 0 3px 10px rgba(80, 130, 45, 0.12);
    transform: translateY(-1px);
}

.post-poll-option.is-selected {
    border-color: #72c239;
}

.post-poll-option:disabled {
    cursor: default;
}

.post-poll-option.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.post-poll-progress {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 10px 0 0 10px;
    background: rgba(129, 215, 66, 0.18);
    transition: width 0.35s ease;
}

.post-poll-option.is-selected .post-poll-progress {
    background: rgba(129, 215, 66, 0.28);
}

.post-poll-option-copy {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}

.post-poll-option-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.post-poll-option-label i {
    color: #8a9585;
}

.post-poll-option.is-selected .post-poll-option-label i {
    color: #65b52f;
    font-weight: 900;
}

.post-poll-option-copy strong {
    color: #51604b;
    font-size: 0.82rem;
}

.post-poll-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    color: #778172;
    font-size: 0.78rem;
}

/* Presentación de encuestas dentro del modal de comentarios grande. */
#postModal .modal-media-section.poll-modal-media {
    align-items: stretch;
    background: #eef3ea;
}

#postModal .poll-modal-media #postModalContent {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: 98vh;
    display: block;
}

#postModal .modal-poll-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: clamp(24px, 5vw, 64px);
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #aab7a2 transparent;
}

#postModal .modal-poll-stage .post-poll {
    width: min(100%, 760px);
    flex: 0 0 auto;
    margin: auto;
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid #d7e0d1;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(63, 89, 48, 0.14);
    box-sizing: border-box;
}

#postModal .modal-poll-stage .post-poll-heading h4 {
    margin-top: 12px;
    font-size: clamp(1.05rem, 1.7vw, 1.4rem);
}

#postModal .modal-poll-stage .post-poll-option {
    min-height: 50px;
}

#postModal .modal-poll-stage::-webkit-scrollbar {
    width: 8px;
}

#postModal .modal-poll-stage::-webkit-scrollbar-thumb {
    background: #aab7a2;
    border-radius: 999px;
}

@media (max-width: 576px) {
    .poll-composer {
        padding: 13px;
    }

    .poll-composer-select {
        width: 100%;
        margin-left: 0;
    }

    .post-poll {
        margin-right: 14px;
        margin-left: 14px;
    }

    #postModal .modal-media-section.poll-modal-media {
        width: 100vw !important;
        min-height: min(62vh, 580px);
    }

    #postModal .poll-modal-media #postModalContent {
        width: 100% !important;
        min-height: min(62vh, 580px);
        margin: 0 !important;
    }

    #postModal .modal-poll-stage {
        min-height: min(62vh, 580px);
        padding: 20px 14px;
    }

    #postModal .modal-poll-stage .post-poll {
        width: 100%;
        margin: auto 0;
        padding: 16px;
    }
}
