/* K-Surveys — frontend styles */
.ks-wrap { max-width: 680px; margin: 0 auto; font-size: 15px; line-height: 1.6; color: #1a1a1a; }
.ks-logo  { margin-bottom: 16px; }
.ks-logo img { max-height: 80px; width: auto; }
.ks-titulo { font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.ks-objetivo { margin-bottom: 16px; }
.ks-encerrada { padding: 16px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; color: #374151; }

/* Barra de progresso */
.ks-progresso { margin: 0 0 20px; }
.ks-progresso-count { font-size: 14px; margin-bottom: 6px; }
.ks-progresso-bar { background: #e5e7eb; border-radius: 999px; height: 8px; overflow: hidden; }
.ks-progresso-fill { background: #1d4ed8; height: 100%; border-radius: 999px; transition: width .4s ease; }

/* Link PDF */
.ks-pdf-link { margin-bottom: 16px; }
.ks-pdf-link a { color: #1d4ed8; text-decoration: underline; }

/* Formulário */
.ks-form { margin-top: 8px; }
.ks-campo { margin-bottom: 14px; }
.ks-campo label, .ks-pergunta legend { display: block; font-weight: 500; margin-bottom: 4px; }
.ks-campo input[type=text],
.ks-campo input[type=email],
.ks-campo input[type=date],
.ks-campo textarea,
.ks-pergunta input[type=text],
.ks-pergunta textarea,
.ks-pergunta input[type=date] {
    width: 100%; box-sizing: border-box;
    border: 1px solid #d1d5db; border-radius: 6px;
    padding: 8px 10px; font-size: 15px; line-height: 1.4;
}
.ks-campo input:focus, .ks-pergunta input:focus, .ks-pergunta textarea:focus { border-color: #1d4ed8; outline: none; box-shadow: 0 0 0 2px rgba(29,78,216,.15); }
.ks-req { color: #dc2626; }
.ks-pergunta { border: none; padding: 0; margin: 0 0 18px; }
.ks-pergunta legend { font-weight: 500; margin-bottom: 6px; }
.ks-opcao { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; cursor: pointer; }
.ks-escala { display: flex; gap: 8px; flex-wrap: wrap; }
.ks-escala-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; cursor: pointer; }

/* Termos */
.ks-termos-wrap .ks-opcao { align-items: flex-start; }
.ks-termos-wrap a { color: #1d4ed8; }

/* Logado info */
.ks-logado-info { margin-bottom: 12px; color: #374151; }

/* OTP */
.ks-otp-instrucao { margin-bottom: 12px; }
#ks-otp { font-size: 22px; letter-spacing: 4px; width: 160px; text-align: center; }

/* Botões */
.ks-actions { margin-top: 20px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ks-btn { background: #1d4ed8; color: #fff; border: none; border-radius: 6px; padding: 10px 24px; font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s; }
.ks-btn:hover { background: #1e40af; }
.ks-btn-link { background: none; border: none; color: #1d4ed8; cursor: pointer; font-size: 14px; padding: 0; text-decoration: underline; }

/* Feedback */
.ks-feedback { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.ks-feedback.ks-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.ks-feedback.ks-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Modal termos / PDF */
.ks-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9998; display: flex; align-items: center; justify-content: center; }
.ks-modal-box { background: #fff; border-radius: 12px; width: 90%; max-width: 700px; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.ks-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #e5e7eb; }
.ks-modal-header h3 { margin: 0; font-size: 16px; }
.ks-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; line-height: 1; }
.ks-modal-body { flex: 1; overflow: auto; }
.ks-modal-body iframe { width: 100%; height: 100%; min-height: 400px; border: none; display: block; }

.ks-ja-respondeu { display:flex; align-items:center; gap:10px; padding:16px 20px; background:#d1fae5; border:1px solid #6ee7b7; border-radius:8px; color:#065f46; font-weight:500; }
.ks-ja-respondeu-icon { font-size:20px; line-height:1; }
.ks-restrito { padding: 20px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; color: #374151; }
.ks-restrito p { margin: 0 0 12px; }
.ks-restrito .ks-btn { display: inline-block; text-decoration: none; }
.ks-max-hint { font-size: 12px; color: #6b7280; margin: 0 0 6px; }
.ks-check-group input[type=checkbox]:disabled + span,
.ks-check-group label:has(input:disabled) { opacity: .4; cursor: not-allowed; }

@media (max-width: 500px) {
    .ks-btn { width: 100%; text-align: center; }
    .ks-actions { flex-direction: column; }
}
