/* =========================================================
   Votas — Poll Submission Frontend Styles
   ========================================================= */

:root {
	--vs-primary: #4f46e5;
	--vs-primary-hover: #4338ca;
	--vs-success: #16a34a;
	--vs-danger: #dc2626;
	--vs-warning: #d97706;
	--vs-gray-50: #f9fafb;
	--vs-gray-100: #f3f4f6;
	--vs-gray-200: #e5e7eb;
	--vs-gray-400: #9ca3af;
	--vs-gray-600: #4b5563;
	--vs-gray-800: #1f2937;
	--vs-radius: 12px;
	--vs-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.votas-submit-wrap {
	max-width: 680px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--vs-gray-800);
	position: relative;
}

/* ── Stepper ──────────────────────────────────────────── */
.votas-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin-bottom: 32px;
}

.votas-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	opacity: .4;
	transition: opacity .3s;
}

.votas-step.active { opacity: 1; }
.votas-step.done   { opacity: .8; }

.votas-step-num {
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--vs-gray-200);
	color: var(--vs-gray-600);
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 14px;
	transition: background .3s, color .3s;
}

.votas-step.active .votas-step-num {
	background: var(--vs-primary);
	color: #fff;
}

.votas-step.done .votas-step-num {
	background: var(--vs-success);
	color: #fff;
}

.votas-step-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--vs-gray-600);
	white-space: nowrap;
}

.votas-step-divider {
	flex: 1;
	height: 2px;
	background: var(--vs-gray-200);
	margin: 0 8px;
	margin-bottom: 22px;
	min-width: 40px;
}

/* ── Card ────────────────────────────────────────────── */
.votas-card {
	background: #fff;
	border-radius: var(--vs-radius);
	box-shadow: var(--vs-shadow);
	overflow: hidden;
	margin-bottom: 24px;
}

.votas-card-header {
	padding: 24px 28px 0;
	border-bottom: 1px solid var(--vs-gray-100);
	padding-bottom: 20px;
}

.votas-card-header h2 {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: var(--vs-gray-800);
}

.votas-card-header p {
	margin: 0;
	color: var(--vs-gray-600);
	font-size: 14px;
}

.votas-card-body {
	padding: 24px 28px;
}

/* ── Campos ──────────────────────────────────────────── */
.votas-field {
	margin-bottom: 20px;
}

.votas-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--vs-gray-800);
	margin-bottom: 8px;
}

.votas-field label .required {
	color: var(--vs-danger);
	margin-left: 2px;
}

.votas-field label .votas-optional {
	color: var(--vs-gray-400);
	font-weight: 400;
	font-size: 12px;
}

.votas-field input[type="text"],
.votas-field input[type="email"],
.votas-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--vs-gray-200);
	border-radius: 8px;
	font-size: 15px;
	color: var(--vs-gray-800);
	background: var(--vs-gray-50);
	transition: border-color .2s, box-shadow .2s;
	box-sizing: border-box;
	font-family: inherit;
}

.votas-field input:focus,
.votas-field textarea:focus {
	outline: none;
	border-color: var(--vs-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,.12);
	background: #fff;
}

.votas-field textarea { resize: vertical; min-height: 80px; }

/* ── Upload de imagem ────────────────────────────────── */
.votas-upload-area {
	border: 2px dashed var(--vs-gray-200);
	border-radius: 10px;
	padding: 24px;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s, background .2s;
	position: relative;
	background: var(--vs-gray-50);
}

.votas-upload-area:hover {
	border-color: var(--vs-primary);
	background: rgba(79,70,229,.04);
}

.votas-upload-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--vs-gray-400);
	font-size: 14px;
}

.votas-upload-icon { font-size: 32px; }

#vs-image-preview {
	max-width: 100%;
	max-height: 200px;
	border-radius: 8px;
	object-fit: cover;
}

.votas-btn-remove-img {
	position: absolute;
	top: 8px; right: 8px;
	background: rgba(0,0,0,.6);
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 4px 10px;
	font-size: 12px;
	cursor: pointer;
}

/* ── Opções ──────────────────────────────────────────── */
#vs-options-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}

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

.vs-option-input {
	flex: 1;
	padding: 10px 14px;
	border: 1.5px solid var(--vs-gray-200);
	border-radius: 8px;
	font-size: 15px;
	background: var(--vs-gray-50);
	transition: border-color .2s;
	font-family: inherit;
}

.vs-option-input:focus {
	outline: none;
	border-color: var(--vs-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,.12);
	background: #fff;
}

.vs-remove-option {
	width: 34px; height: 34px;
	border: none;
	border-radius: 50%;
	background: var(--vs-gray-100);
	color: var(--vs-gray-600);
	cursor: pointer;
	font-size: 14px;
	flex-shrink: 0;
	transition: background .2s, color .2s;
}

.vs-remove-option:hover {
	background: #fef2f2;
	color: var(--vs-danger);
}

/* ── Planos ──────────────────────────────────────────── */
.votas-plans-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.votas-plan-card {
	border: 2px solid var(--vs-gray-200);
	border-radius: 12px;
	padding: 20px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s, transform .2s, box-shadow .2s;
}

.votas-plan-card:hover {
	border-color: var(--vs-primary);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(79,70,229,.12);
}

.votas-plan-card.selected {
	border-color: var(--vs-primary);
	background: rgba(79,70,229,.04);
}

.votas-plan-name {
	font-weight: 700;
	font-size: 16px;
	color: var(--vs-gray-800);
	margin-bottom: 6px;
}

.votas-plan-desc {
	font-size: 13px;
	color: var(--vs-gray-600);
	margin-bottom: 12px;
	line-height: 1.4;
}

.votas-plan-price {
	font-size: 24px;
	font-weight: 800;
	color: var(--vs-primary);
	margin-bottom: 14px;
}

/* ── Resumo ──────────────────────────────────────────── */
.votas-summary {
	background: var(--vs-gray-50);
	border: 1px solid var(--vs-gray-200);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 20px;
}

.votas-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 8px 0;
	border-bottom: 1px solid var(--vs-gray-200);
	gap: 12px;
}

.votas-summary-row:last-child { border-bottom: none; }

.votas-summary-label {
	font-size: 13px;
	color: var(--vs-gray-600);
	font-weight: 500;
	min-width: 80px;
}

.votas-summary-value {
	font-size: 14px;
	color: var(--vs-gray-800);
	font-weight: 600;
	text-align: right;
	word-break: break-word;
}

.votas-summary-total {
	font-size: 18px;
	color: var(--vs-primary);
	font-weight: 800;
}

/* ── Pagamento ──────────────────────────────────────── */
.votas-payment-methods {
	text-align: center;
	margin-bottom: 20px;
}

.votas-payment-info {
	font-size: 14px;
	color: var(--vs-gray-600);
	line-height: 1.6;
	margin-bottom: 10px;
}

.votas-payment-icons {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.votas-badge-pix {
	background: #00b140;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	padding: 4px 12px;
	border-radius: 20px;
	letter-spacing: .5px;
}

.votas-badge-card {
	background: var(--vs-gray-200);
	color: var(--vs-gray-800);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 20px;
}

/* ── Botões ──────────────────────────────────────────── */
.votas-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.votas-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 22px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: background .2s, transform .1s, box-shadow .2s;
	text-decoration: none;
	font-family: inherit;
}

.votas-btn:active { transform: scale(.98); }

.votas-btn-primary {
	background: var(--vs-primary);
	color: #fff;
}

.votas-btn-primary:hover {
	background: var(--vs-primary-hover);
	box-shadow: 0 4px 16px rgba(79,70,229,.3);
}

.votas-btn-secondary {
	background: var(--vs-gray-100);
	color: var(--vs-gray-800);
}

.votas-btn-secondary:hover { background: var(--vs-gray-200); }

.votas-btn-outline {
	background: transparent;
	color: var(--vs-gray-600);
	border: 1.5px solid var(--vs-gray-200);
}

.votas-btn-outline:hover { border-color: var(--vs-gray-400); }

.votas-btn-plan {
	width: 100%;
	background: var(--vs-primary);
	color: #fff;
	padding: 10px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: background .2s;
}

.votas-btn-plan:hover { background: var(--vs-primary-hover); }

.votas-btn-large { padding: 14px 32px; font-size: 16px; }

.votas-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}

/* ── Erro ────────────────────────────────────────────── */
.votas-field-error {
	color: var(--vs-danger);
	font-size: 13px;
	font-weight: 500;
	margin-top: 8px;
	min-height: 20px;
}

/* ── Avisos ──────────────────────────────────────────── */
.votas-submit-notice {
	border-radius: var(--vs-radius);
	padding: 28px;
	display: flex;
	gap: 20px;
	align-items: flex-start;
	box-shadow: var(--vs-shadow);
}

.votas-notice-success { background: #f0fdf4; border: 1px solid #bbf7d0; }
.votas-notice-warning { background: #fffbeb; border: 1px solid #fde68a; }
.votas-notice-error   { background: #fef2f2; border: 1px solid #fecaca; }

.votas-notice-icon { font-size: 40px; flex-shrink: 0; }

.votas-notice-body h3 {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
}

.votas-notice-body p {
	margin: 0 0 16px;
	color: var(--vs-gray-600);
	line-height: 1.6;
}

/* ── Loading ─────────────────────────────────────────── */
.votas-loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.85);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: var(--vs-radius);
	z-index: 100;
	gap: 16px;
}

.votas-spinner {
	width: 44px; height: 44px;
	border: 4px solid var(--vs-gray-200);
	border-top-color: var(--vs-primary);
	border-radius: 50%;
	animation: vs-spin .8s linear infinite;
}

@keyframes vs-spin { to { transform: rotate(360deg); } }

/* ── Responsivo ──────────────────────────────────────── */
@media (max-width: 500px) {
	.votas-card-body { padding: 16px; }
	.votas-card-header { padding: 16px 16px 16px; }
	.votas-plans-grid { grid-template-columns: 1fr; }
	.votas-actions { justify-content: stretch; }
	.votas-btn { width: 100%; }
	.votas-step-label { font-size: 10px; }
}

/* ── Overrides e novos elementos frontend ───────────────── */

/* Herda estilos do admin para .vs-option-row */
.votas-submit-wrap .vs-options-list { display: flex; flex-direction: column; gap: 10px; }

.votas-submit-wrap .vs-option-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--vs-gray-50, #f9fafb);
	border: 1.5px solid var(--vs-gray-200, #e5e7eb);
	border-radius: 10px;
	padding: 10px 12px;
	flex-wrap: wrap;
}

.votas-submit-wrap .ed-drag-handle {
	cursor: default;
	opacity: .35;
	font-size: 18px;
	flex-shrink: 0;
}

/* Thumb da imagem da opção */
.votas-submit-wrap .vs-opt-thumb {
	width: 42px; height: 42px;
	border-radius: 6px;
	border: 1.5px dashed #d1d5db;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	overflow: hidden;
	transition: border-color .2s;
}
.votas-submit-wrap .vs-opt-thumb:hover { border-color: var(--vs-primary, #4f46e5); }
.votas-submit-wrap .vs-opt-thumb img  { width: 100%; height: 100%; object-fit: cover; }
.votas-submit-wrap .vs-opt-thumb-icon { font-size: 18px; }

/* Editor de imagem da opção */
.votas-submit-wrap .vs-opt-img-editor {
	width: 100%;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 12px;
	margin-top: 2px;
}

.votas-submit-wrap .vs-opt-img-upload-box {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.vs-opt-file-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: var(--vs-gray-100, #f3f4f6);
	border: 1.5px solid var(--vs-gray-200, #e5e7eb);
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	transition: background .2s;
}
.vs-opt-file-label:hover { background: #e5e7eb; }

.vs-opt-img-status { font-size: 12px; color: #6b7280; }

/* Campo de texto da opção */
.votas-submit-wrap .vs-opt-text {
	flex: 1;
	min-width: 140px;
	padding: 9px 12px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	transition: border-color .2s;
}
.votas-submit-wrap .vs-opt-text:focus {
	outline: none;
	border-color: var(--vs-primary, #4f46e5);
	box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* Botões do admin herdados para o frontend */
.votas-submit-wrap .vs-btn { cursor: pointer; }
.votas-submit-wrap .vs-btn-danger {
	background: #fef2f2; color: #dc2626;
	border: 1.5px solid #fecaca; border-radius: 6px;
	padding: 6px 10px; font-size: 13px; font-weight: 600;
}
.votas-submit-wrap .vs-btn-danger:hover { background: #fee2e2; }
.votas-submit-wrap .vs-btn-sm { padding: 5px 10px; font-size: 12px; }
.votas-submit-wrap .vs-btn-outline {
	background: transparent;
	border: 1.5px solid #d1d5db;
	border-radius: 6px; padding: 7px 14px;
	font-size: 13px; font-weight: 600;
}
.votas-submit-wrap .vs-btn-outline:hover { border-color: #9ca3af; }

/* Card header herdado */
.votas-submit-wrap .vs-card-header {
	display: flex; align-items: center;
	justify-content: space-between;
	flex-wrap: wrap; gap: 10px;
}
.votas-submit-wrap .vs-card-header h2 { margin: 0; font-size: 16px; }
.votas-submit-wrap .vs-card-header p  { margin: 4px 0 0; color: #6b7280; font-size: 13px; }

/* Campo de texto e e-mail */
.votas-submit-wrap .vs-field input[type="text"],
.votas-submit-wrap .vs-field input[type="email"],
.votas-submit-wrap .vs-field textarea,
#vs-poll-title,
#vs-submitter-name,
#vs-submitter-email {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	background: #f9fafb;
	box-sizing: border-box;
	transition: border-color .2s;
}
#vs-poll-title:focus,
#vs-submitter-name:focus,
#vs-submitter-email:focus { outline: none; border-color: var(--vs-primary,#4f46e5); background:#fff; }

/* Upload imagem da enquete */
.votas-poll-img-upload {
	border: 2px dashed #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
	transition: border-color .2s;
	overflow: hidden;
}
.votas-poll-img-upload:hover { border-color: var(--vs-primary,#4f46e5); }

.vs-poll-img-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 28px 16px;
	cursor: pointer;
	color: #6b7280;
	font-size: 14px;
	text-align: center;
}
.vs-poll-img-icon  { font-size: 36px; }
.vs-poll-img-hint  { font-size: 12px; color: #9ca3af; }

/* vs-field-row herdado */
.votas-submit-wrap .vs-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 480px) {
	.votas-submit-wrap .vs-field-row { grid-template-columns: 1fr; }
	.votas-submit-wrap .vs-option-row { flex-wrap: wrap; }
}

/* label required */
.votas-submit-wrap label .required { color: #dc2626; margin-left:2px; }
.votas-optional { color: #9ca3af; font-size: 12px; font-weight: 400; }

/* ── Telefone ────────────────────────────────────────── */
#vs-submitter-phone {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	background: #f9fafb;
	box-sizing: border-box;
	transition: border-color .2s;
}
#vs-submitter-phone:focus {
	outline: none;
	border-color: var(--vs-primary, #4f46e5);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* ── Checkbox termos ─────────────────────────────────── */
.votas-terms-field { margin-top: 4px; }

.votas-terms-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
}

.votas-terms-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 2px;
	accent-color: var(--vs-primary, #4f46e5);
	cursor: pointer;
}

.votas-terms-label a {
	color: var(--vs-primary, #4f46e5);
	text-decoration: underline;
	font-weight: 600;
}
.votas-terms-label a:hover { text-decoration: none; }
