/* Modern Article Poll Styles */

:root {
    --poll-primary: #4f46e5;
    --poll-secondary: #6366f1;
    --poll-bg: #ffffff;
    --poll-text: #1f2937;
    --poll-border: #e5e7eb;
    --poll-success: #10b981;
}

.modern-poll-design {
    border: 0px solid #e2e8f0;
    border-radius: 8px; /* Больше скругление */
    overflow: hidden;
    background: #fff; /* Белый фон для чистоты */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); /* Мягкя тень */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 1.5rem 0;
    position: relative;
    border: 2px solid rgba(0,0,0,0.05);
}

.modern-poll-design::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--poll-primary), var(--poll-secondary));
}

/* Новая шапка опроса */
.poll-header-modern {
    padding: 1rem;
    background: #fff;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.poll-badges-row {
    display: flex;
    gap: 8px;
    margin-bottom: 0.75rem;
    overflow-x: auto;
    width: 100%;
}

.poll-badge-modern {
    background: rgba(79, 70, 229, 0.1);
    color: var(--poll-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.poll-badge-outline {
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.poll-question-modern {
    font-family: inherit; /* External font removed for local compliance */
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
}


.poll-description-modern {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

.poll-icon-decorative {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(99, 102, 241, 0.1));
    color: var(--poll-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0.8;
}

.poll-option-wrapper {
    position: relative;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 0.6rem 0.8rem; /* Более компактные отступы */
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    margin-bottom: 0.5rem !important; /* Меньше отступ между опциями */
}

.poll-option-wrapper:hover {
    border-color: var(--poll-primary);
    background: #fcfcff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.poll-option-wrapper.is-selected {
    border-color: var(--poll-success);
    background: #f0fdf4;
}

.poll-option-wrapper.is-disabled {
    opacity: 0.6;
    filter: grayscale(0.5);
    cursor: default;
    pointer-events: none;
}

.poll-option-wrapper.is-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #f1f5f9;
}

.modern-progress {
    height: 8px; /* Чуть тоньше */
    background-color: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

/* Helper Classes (Polyfill for missing Bootstrap) */
.d-flex { display: flex !important;align-items: center; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
/* .align-items-center { align-items: center !important; } */
.align-items-end { align-items: flex-end !important; }
.align-items-start { align-items: flex-start !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.w-100 { width: 100% !important; }
.gap-2 { gap: 0.5rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.5rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.2rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.ms-auto { margin-left: auto !important; }

.p-4 { padding: 1rem; }
.pt-3 { padding-top: 1rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }

.text-muted { color: #64748b !important; } /* Slate 500 */
.text-dark { color: #0f172a !important; } /* Slate 900 */
.text-success { color: #10b981 !important; }
.text-primary { color: var(--poll-primary) !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }

.fw-bold { font-weight: 700 !important; }
.small { font-size: 0.875em !important; }

.rounded-circle { border-radius: 50% !important; }
.rounded-pill { border-radius: 50rem !important; }

.bg-primary { background-color: var(--poll-primary) !important; }
.bg-success { background-color: var(--poll-success) !important; }
.bg-info { background-color: #17a2b8 !important; }

.border-top { border-top: 1px solid #e2e8f0 !important; }
.border-bottom { border-bottom: 1px solid #e2e8f0 !important; }

.d-none {
    display: none !important;
}

.max-choices-wrapper {
    display: flex; 
    align-items: center;
    gap: 8px;
}

.max-choices-input {
    width: 70px !important;
}

.max-choices-label {
    font-size: 0.9rem;
}

.poll-panel-article-view{
	margin-bottom: 0;
	padding-right: 5px;
}

/* Voters List Styles (Modern Design) */
.poll-voters-trigger {
    cursor: pointer;
    transition: all 0.2s;
    background-color: rgba(79, 70, 229, 0.05);
    padding: 2px 10px;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--poll-primary);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.poll-voters-trigger:hover {
    background-color: var(--poll-primary);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.poll-voters-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.poll-voters-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    overflow: hidden;
}

.poll-voters-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poll-voters-option {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poll-voters-badge {
    background: var(--poll-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50rem;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.poll-voters-list-container {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.poll-voters-list-container::-webkit-scrollbar { width: 5px; }
.poll-voters-list-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.poll-voter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.poll-voter-item:last-child { border-bottom: none; }

.poll-voter-item:hover {
    background-color: #f1f5f9;
}

.poll-voter-avatar img {
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.poll-voter-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.poll-voter-name {
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
}

.poll-voter-name:hover { color: var(--poll-primary); text-decoration: underline; }

.poll-voter-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.poll-voters-empty {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-style: italic;
}

/* Poll Action Buttons */
.poll-btn-vote {
    background: linear-gradient(135deg, var(--poll-primary) 0%, var(--poll-secondary) 100%);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

.poll-btn-vote:hover {
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, var(--poll-secondary) 0%, var(--poll-primary) 100%);
    color: #fff;
}

.poll-btn-vote:active {
    transform: translateY(-1px);
}

.poll-btn-change-vote {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.poll-btn-change-vote:hover {
    background: #f8fafc;
    color: var(--poll-primary);
    border-color: var(--poll-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pulse-on-hover:hover i {
    animation: poll-pulse 1s infinite;
}

@keyframes poll-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* --- Editor Styles --- */
.modern-switch-inline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    flex-wrap: wrap;
}
.modern-switch {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.poll-ui-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}
.poll-ui-switch input { opacity: 0; width: 0; height: 0; }
.poll-ui-switch .poll-ui-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1; transition: .2s; border-radius: 24px;
}
.poll-ui-switch .poll-ui-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; transition: .2s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.poll-ui-switch input:checked + .poll-ui-slider { background: var(--poll-primary); }
.poll-ui-switch input:checked + .poll-ui-slider:before { transform: translateX(22px); }

/* --- Checkbox/Radio --- */
.custom-control {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    min-height: 24px;
}
.custom-control input { position: absolute; opacity: 0; cursor: pointer; height: 100%; width: 100%; left: 0; top: 0; margin: 0; z-index: 2; }
.custom-control .poll-ui-checkmark {
    position: absolute; top: 50%; left: 0; transform: translateY(-50%);
    height: 22px; width: 22px; background-color: #fff; border: 2px solid #cbd5e1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-checkbox .poll-ui-checkmark { border-radius: 6px; }
.custom-radio .poll-ui-checkmark { border-radius: 50%; }
.custom-control:hover input ~ .poll-ui-checkmark { border-color: var(--poll-primary); background-color: #f8fafc; }
.custom-control input:checked ~ .poll-ui-checkmark { background-color: var(--poll-primary); border-color: var(--poll-primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15); }
.poll-ui-checkmark:after { content: ""; position: absolute; display: none; }
.custom-control input:checked ~ .poll-ui-checkmark:after { display: block; }
.custom-checkbox .poll-ui-checkmark:after { left: 7px; top: 3px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.custom-radio .poll-ui-checkmark:after { top: 6px; left: 6px; width: 10px; height: 10px; border-radius: 50%; background: white; }
@media (max-width: 768px) {
    .poll-icon-decorative { display: none; } /* Hide icon on mobile for space */
    .modern-poll-design { border-radius: 8px;  }
}


/* --- ArticlePoll UI: Components (Dialogs, Notifications) --- */
.poll-ui-overlay-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.poll-ui-overlay-container.is-active { opacity: 1; visibility: visible; }

.poll-ui-dialog-box {
    background: #fff; width: 90%; max-width: 500px;
    border-radius: 12px; padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(20px); transition: transform 0.3s;
    display: flex; flex-direction: column;
    max-height: 85vh; 
}
.poll-ui-overlay-container.is-active .poll-ui-dialog-box { transform: translateY(0); }

.poll-ui-dialog-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; 
}
.poll-ui-dialog-title { font-size: 1.2rem; font-weight: 700; color: var(--poll-text); margin: 0; }
.poll-ui-dialog-close { 
    background: none; border: none; font-size: 1.5rem; 
    cursor: pointer; color: #94a3b8; line-height: 1; padding: 0 5px;
}
.poll-ui-dialog-close:hover { color: #64748b;background-color: #e2e8f0; }

.poll-ui-dialog-body { overflow-y: auto; flex: 1; min-height: 50px; font-size: 0.95rem; color: #475569; padding: 10px 0; }
.poll-ui-dialog--confirm .poll-ui-dialog-body { text-align: center; }
.poll-ui-dialog-icon { font-size: 3.5rem; color: var(--poll-primary); margin-bottom: 1rem; opacity: 0.9; }
.poll-ui-dialog-message { font-size: 1.05rem; font-weight: 500; line-height: 1.5; color: #334155; margin: 0; }

.poll-ui-dialog-footer { 
    margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 15px; 
}
.poll-ui-dialog--confirm .poll-ui-dialog-footer { justify-content: center; border-top: none; padding-top: 0; margin-top: 10px; }

/* UI Buttons */
.poll-ui-btn { 
    padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; 
    font-family: inherit; font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.poll-ui-btn-primary { background: var(--poll-primary); color: #fff; }
.poll-ui-btn-primary:hover {
    color: #fff;
    background: var(--poll-secondary);
}
.poll-ui-btn-secondary { background: #e2e8f0; color: #475569; }
.poll-ui-btn-secondary:hover { background: #cbd5e1; }
.poll-ui-btn-danger { background: #ef4444; color: #fff; }
.poll-ui-btn-danger:hover { background: #dc2626; }

/* --- ArticlePoll Notifications (Toast) --- */
.poll-ui-notify {
    position: fixed; top: 20px; right: 20px; z-index: 10001;
    background: #fff; padding: 12px 20px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 12px;
    transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.95rem; color: #334155; border: 1px solid #f1f5f9;
}
.poll-ui-notify.is-active { transform: translateX(0); }
.poll-ui-notify.success { border-left: 4px solid var(--poll-success); }
.poll-ui-notify.error { border-left: 4px solid #ef4444; }
.poll-ui-notify.info { border-left: 4px solid var(--poll-primary); }
.poll-ui-notify-icon { font-size: 1.2rem; }
.poll-ui-notify.success .poll-ui-notify-icon { color: var(--poll-success); }
.poll-ui-notify.error .poll-ui-notify-icon { color: #ef4444; }

/* --- Voting Mode Semantic Block (Slider) --- */

/* Modern Card Box */
.poll-editor-container.modern-card {
    background: #fff;
    border: 1px solid #cbd5e1; /* visible contour */
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 15px;
    margin-bottom: 15px;
}

.card-poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
		flex-wrap: wrap;
}

.card-poll-header h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.card-poll-body {
    transition: all 0.3s ease;
}

/* Enhanced Inputs */
.poll-editor-container .form-control, 
.poll-editor-container .poll-ui-input {
    border: 1px solid #cbd5e1 !important;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.poll-editor-container .form-control:focus, 
.poll-editor-container .poll-ui-input:focus {
    border-color: var(--poll-primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

/* Compact Voting Mode Slider */
.poll-mode-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 50rem;
    width: fit-content;
    border: 1px solid #e2e8f0;
}
.poll-mode-option {
    font-size: 0.95rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.poll-mode-option i { font-size: 0.9em; }

.poll-mode-option.active {
    color: var(--poll-primary);
    font-weight: 600;
}

.custom-mode-switch {
    display: flex;
    align-items: center;
}

.voting-mode-hint {
    font-size: 0.85rem; color: #64748b; margin-top: 8px; margin-left: 5px;
}


/* Bottom Actions Section */
.poll-bottom-actions {
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s ease;
}

.poll-bottom-actions.is-collapsed {
    display: none;
}

.poll-ui-toggle-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poll-ui-toggle-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.poll-ui-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

.poll-ui-toggle-btn.is-active .toggle-icon {
    transform: rotate(180deg);
}

.poll-bottom-grid {
    display: grid;
    gap: 1.5rem;
}

.poll-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
}

label {
    margin-bottom: 0;
}
/* Ensure the grid doesn't stack too tightly if multiple are used */
.poll-settings-grid + .poll-settings-grid {
    margin-top: 8px;
}
.poll-setting-item.number-of-choices{
    display: flex;
    justify-content: center;
}
.poll-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.poll-setting-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.max-choices-input {
    width: 60px !important;
    padding: 2px 5px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
}

.poll-setting-label.me-3 {
    margin-right: 8px;
}


@media (max-width: 768px) {
    .poll-mode-switch-wrapper {
        justify-content: center;
    }
    .poll-settings-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
    }
    .poll-setting-item {
        padding: 10px 14px;
    }
}

/* --- Editor Styles Restoration (No Bootstrap) --- */

/* Responsive Grid for Editor */
.poll-editor-container .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.poll-editor-container [class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
    box-sizing: border-box; 
}

div#poll_fields{
	  padding-top: 0.5rem;
    margin-top: 0.5rem;
		border-top: 1px solid #f1f5f9;
}

/* Desktop Grid */
@media (min-width: 768px) {
    .poll-editor-container .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .poll-editor-container .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .poll-editor-container .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .poll-editor-container .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Mobile Styles */
@media (max-width: 767.98px) {
    .poll-editor-container .row {
        margin-right: 0;
        margin-left: 0;
    }
    
    .poll-editor-container [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 1rem;
    }

    /* Voting Mode: Stack vertically */
    .poll-editor-container .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    /* Adjust form checks for better touch area */
    .poll-editor-container .form-check {
        margin-bottom: 0.5rem;
        padding-left: 0; /* Custom control handles padding */
    }

    /* Bottom actions stack */
    .poll-editor-container #add-poll-option {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .poll-editor-container .modern-switch-inline {
        justify-content: space-between;
        /* width: 100%; */
        background: #f8fafc;
        padding: 10px;
        border-radius: 8px;
    }

    .poll-editor-container .max-choices-wrapper {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .poll-voters-trigger {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }
}



/* Form Controls */
.poll-editor-container .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--poll-text);
}

.poll-editor-container .form-control, 
.poll-editor-container .poll-ui-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.poll-editor-container .form-control:focus {
    border-color: var(--poll-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Input Group */
.poll-editor-container .input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.poll-editor-container .input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    margin-bottom: 0;
    border-radius: 0;
}

.poll-editor-container .input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
}

/* Radius fixes for input group */
.poll-editor-container .input-group > :first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    border-right: 0;
}
.poll-editor-container .input-group > :not(:first-child):not(:last-child) {
    border-radius: 0;
}
.poll-editor-container .input-group > :last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-left: 0;
}

/* Buttons */
.poll-add-option-row {
    margin-bottom: 1rem;
}

button#add_poll_option {
    background: linear-gradient(135deg, var(--poll-primary) 0%, var(--poll-secondary) 100%);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

button#add_poll_option:hover {
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, var(--poll-secondary) 0%, var(--poll-primary) 100%);
    color: #fff;
}

.poll-editor-container .btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.poll-editor-container .btn-primary {
    color: #fff;
    background-color: var(--poll-primary);
    border-color: var(--poll-primary);
}
.poll-editor-container .btn-primary:hover {
    background-color: var(--poll-secondary);
}

.poll-editor-container .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}
.poll-editor-container .btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
}

.poll-editor-container .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Form Check */
.poll-editor-container .form-check {
    position: relative;
    display: flex;
    align-items: center; 
    padding-left: 0;
    min-height: 1.5rem;
}
.poll-editor-container .form-check-input {
    margin-top: 0;
    margin-right: 0.5rem;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

@media (max-width: 425px) {
.modern-switch.d-flex.align-items-center >.me-2.mb-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
}
@media (max-width: 480px) {
	.poll-setting-item.number-of-choices {
    display: flex;
    justify-content: flex-start;
}
.poll-editor-container.modern-card {
    padding: 8px;
}
.poll-header-modern {
    padding: 10px 10px 0 10px;
}
.p-4 {
    padding: 0px 10px 10px 10px;
}
}