/* Poll & Survey Builder — frontend styles */
.psb-poll { max-width: 680px; margin: 1.5em 0; }
.psb-poll * { box-sizing: border-box; }

.psb-banner { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 15px; }
.psb-banner-success { background: #e7f6ec; color: #18603a; border: 1px solid #a8d8bd; }
.psb-banner-error { background: #fdecec; color: #8a1f1f; border: 1px solid #f0b4b4; }

.psb-field { margin: 0 0 22px; }
.psb-label { display: block; font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.psb-req { color: #c0392b; }
.psb-help { margin: 0 0 8px; font-size: 13px; color: #666; }

.psb-input {
	width: 100%; padding: 10px 12px; font-size: 15px;
	border: 1px solid #ccc; border-radius: 6px; background: #fff;
}
.psb-input:focus { border-color: #2b6cb0; outline: none; box-shadow: 0 0 0 2px rgba(43,108,176,.15); }
textarea.psb-input { resize: vertical; }

.psb-options { display: flex; flex-direction: column; gap: 8px; }
.psb-option {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 12px; border: 1px solid #e0e0e0; border-radius: 8px;
	cursor: pointer; transition: border-color .15s, background .15s;
}
.psb-option:hover { border-color: #2b6cb0; background: #f7fafc; }
.psb-option input { margin: 0; }
.psb-option-text { font-size: 15px; }

/* Imaged option grid */
.psb-options-imaged { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.psb-options-imaged .psb-option { flex-direction: column; text-align: center; align-items: center; }
.psb-option-img { width: 100%; }
.psb-option-img img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; display: block; }

.psb-actions { margin-top: 8px; }
.psb-submit {
	background: #2b6cb0; color: #fff; border: 0; border-radius: 6px;
	padding: 12px 26px; font-size: 16px; cursor: pointer;
}
.psb-submit:hover { background: #245a96; }

.psb-error { color: #8a1f1f; }

.psb-recaptcha-note { margin: 12px 0 0; font-size: 12px; color: #888; line-height: 1.5; }
.psb-recaptcha-note a { color: #666; text-decoration: underline; }

/* ---------- Results ---------- */
.psb-results { max-width: 720px; margin: 1.5em 0; }
.psb-results-head h3 { margin: 0 0 2px; }
.psb-results-total { margin: 0 0 18px; color: #666; font-size: 14px; }
.psb-result-block { margin: 0 0 28px; padding: 0 0 20px; border-bottom: 1px solid #eee; }
.psb-result-q { margin: 0 0 12px; font-size: 17px; }

.psb-bars { display: flex; flex-direction: column; gap: 10px; }
.psb-bar-row { display: grid; grid-template-columns: 180px 1fr 90px; align-items: center; gap: 10px; }
.psb-bar-label { font-size: 14px; }
.psb-bar-track { background: #eef1f5; border-radius: 6px; height: 22px; overflow: hidden; }
.psb-bar-fill { background: #2b6cb0; height: 100%; border-radius: 6px; min-width: 2px; transition: width .4s; }
.psb-bar-val { font-size: 13px; color: #444; text-align: right; }

.psb-pie-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.psb-pie { width: 180px; height: 180px; border-radius: 50%; }
.psb-legend { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.psb-legend li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.psb-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

.psb-count-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.psb-count-table th, .psb-count-table td { border: 1px solid #e2e2e2; padding: 8px 12px; text-align: left; }
.psb-count-table th { background: #f7f7f9; }

.psb-answer-list { margin: 0; padding-left: 18px; font-size: 14px; }
.psb-answer-list li { margin-bottom: 6px; }
.psb-muted { color: #999; }

.psb-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.psb-stat { background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 20px; text-align: center; min-width: 90px; }
.psb-stat-num { display: block; font-size: 24px; font-weight: 700; color: #2b3a55; }
.psb-stat-cap { display: block; font-size: 12px; color: #718096; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 520px) {
	.psb-bar-row { grid-template-columns: 1fr; gap: 2px; }
	.psb-bar-val { text-align: left; }
}
