/* Poll Modal Styles - Matching BongoEye Admin Dark Theme */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none !important;
}

.poll-modal-content {
    background-color: #17212b;
    border: 1px solid #242f3d;
    width: 92%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    overflow: hidden;
}

.poll-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #242f3d;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

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

.poll-close-btn {
    background: transparent;
    border: none;
    color: #7f91a4;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}
.poll-close-btn:hover {
    color: #fff;
}

/* Tab Switcher in Poll Modal */
.poll-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: #0e1621;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #1a2533;
}

.poll-tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #7f91a4;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.poll-tab-btn.active {
    background: #242f3d;
    color: #2aacc8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.poll-tab-badge {
    font-size: 11px;
    background: #2aacc8;
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
}

.poll-modal-body {
    overflow-y: auto;
    padding-right: 4px;
    flex: 1;
}

.poll-modal-body::-webkit-scrollbar {
    width: 6px;
}
.poll-modal-body::-webkit-scrollbar-thumb {
    background: #242f3d;
    border-radius: 4px;
}

.poll-input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    background-color: #242f3d;
    border: 1px solid #1a2533;
    color: #fff;
    border-radius: 6px;
    outline: none;
    font-size: 13px;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.poll-input:focus {
    border-color: #2aacc8;
}

.poll-input::placeholder {
    color: #7f91a4;
}

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

.poll-option-row .poll-input {
    margin-bottom: 0;
    flex: 1;
}

.poll-del-opt-btn {
    background: rgba(239, 83, 80, 0.15);
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: #ef5350;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.poll-del-opt-btn:hover {
    background: #ef5350;
    color: #fff;
}

.add-option-btn {
    background: transparent;
    color: #2aacc8;
    border: 1px dashed rgba(42, 172, 200, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    cursor: pointer;
    margin-bottom: 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}
.add-option-btn:hover {
    background: rgba(42, 172, 200, 0.08);
    border-color: #2aacc8;
}

.poll-status-group {
    background: #0e1621;
    border: 1px solid #1a2533;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poll-status-group label {
    font-size: 12px;
    color: #7f91a4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.poll-select {
    background: #242f3d;
    border: 1px solid #1a2533;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.poll-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #242f3d;
}

.poll-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.poll-btn.cancel {
    background: #242f3d;
    color: #7f91a4;
}
.poll-btn.cancel:hover {
    color: #fff;
}

.poll-btn.create {
    background: linear-gradient(135deg, #0088cc, #2aacc8);
    color: #fff;
}
.poll-btn.create:hover {
    opacity: 0.92;
}

/* Existing Polls List inside Modal */
.poll-item-card {
    background: #0e1621;
    border: 1px solid #1a2533;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}
.poll-item-card:hover {
    border-color: #242f3d;
}

.poll-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.poll-item-question {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.poll-badge-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}
.poll-badge-chip.active {
    background: rgba(102, 187, 106, 0.18);
    color: #66bb6a;
    border: 1px solid rgba(102, 187, 106, 0.35);
}
.poll-badge-chip.closed {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.poll-item-meta {
    font-size: 11px;
    color: #7f91a4;
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.poll-results-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.poll-result-bar-wrap {
    background: #17212b;
    border-radius: 6px;
    padding: 6px 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid #1a2533;
}

.poll-result-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: rgba(42, 172, 200, 0.2);
    border-radius: 6px;
    transition: width 0.3s ease;
    z-index: 1;
}

.poll-result-text {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #fff;
}

.poll-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #17212b;
    padding-top: 10px;
}

.poll-action-btn {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.poll-action-btn.edit {
    background: #242f3d;
    color: #2aacc8;
    border-color: #2aacc8;
}
.poll-action-btn.toggle {
    background: #242f3d;
    color: #ffa726;
    border-color: #ffa726;
}
.poll-action-btn.delete {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
    border-color: rgba(239, 83, 80, 0.3);
}
.poll-action-btn.delete:hover {
    background: #ef5350;
    color: #fff;
}
