/* =============================================
   Seologic SEO Quiz Popup
   /wp-content/themes/[theme]/quiz/quiz-popup.css
   ============================================= */

:root {
  --qz-green:      #3ecf6e;
  --qz-green-bg:   #eaf8f0;
  --qz-green-dark: #1a8c45;
  --qz-overlay:    rgba(10, 16, 26, 0.72);
  --qz-radius:     12px;
  --qz-radius-sm:  8px;
}

/* ---------- Триггер-кнопка ---------- */
.quiz-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--qz-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.quiz-open-btn:hover  { background: #36bc5f; }
.quiz-open-btn:active { transform: scale(0.98); }

/* ---------- Оверлей ---------- */
.qz-overlay {
  position: fixed;
  inset: 0;
  background: var(--qz-overlay);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.qz-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Модальное окно ---------- */
.qz-modal {
  background: #fff;
  border-radius: var(--qz-radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.2s;
}
.qz-overlay.open .qz-modal {
  transform: translateY(0) scale(1);
}

/* Скролл внутри модалки */
.qz-modal::-webkit-scrollbar { width: 4px; }
.qz-modal::-webkit-scrollbar-track { background: transparent; }
.qz-modal::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* ---------- Шапка модалки ---------- */
.qz-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.qz-header-text {}
.qz-logo-line {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qz-green);
  margin: 0 0 4px;
}
.qz-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.3;
}
.qz-close {
  background: #f4f4f4;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  color: #666;
  transition: background 0.15s;
}
.qz-close:hover { background: #e8e8e8; }

/* ---------- Прогресс ---------- */
.qz-progress-wrap {
  padding: 16px 24px 0;
}
.qz-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.qz-progress-bar {
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}
.qz-progress-fill {
  height: 100%;
  background: var(--qz-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ---------- Тело квиза ---------- */
.qz-body {
  padding: 20px 24px 24px;
}

/* ---------- Шаги ---------- */
.qz-step { display: none; }
.qz-step.active { display: block; }

.qz-q-title {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin: 0 0 4px;
  line-height: 1.4;
}
.qz-q-sub {
  font-size: 13px;
  color: #888;
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ---------- Варианты ответов ---------- */
.qz-options {
  display: grid;
  gap: 8px;
}
.qz-options.cols2 {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 480px) {
  .qz-options.cols2 { grid-template-columns: 1fr; }
}

.qz-opt {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--qz-radius-sm);
  padding: 11px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
.qz-opt:hover {
  border-color: var(--qz-green);
  background: var(--qz-green-bg);
}
.qz-opt.selected {
  border: 2px solid var(--qz-green);
  background: var(--qz-green-bg);
}
.qz-opt-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
  color: #666;
  transition: background 0.15s, color 0.15s;
}
.qz-opt.selected .qz-opt-icon {
  background: var(--qz-green);
  color: #fff;
}
.qz-opt-label {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  line-height: 1.3;
}
.qz-opt.selected .qz-opt-label { color: var(--qz-green-dark); }
.qz-opt-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* ---------- Навигация ---------- */
.qz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  gap: 10px;
}
.qz-btn-back {
  background: none;
  border: 1px solid #ddd;
  border-radius: var(--qz-radius-sm);
  padding: 9px 18px;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  transition: border-color 0.15s;
}
.qz-btn-back:hover { border-color: #bbb; color: #555; }
.qz-btn-back.hidden { visibility: hidden; }

.qz-btn-next {
  background: var(--qz-green);
  border: none;
  border-radius: var(--qz-radius-sm);
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.15s, background 0.15s;
}
.qz-btn-next.ready {
  opacity: 1;
  pointer-events: auto;
}
.qz-btn-next.ready:hover { background: #36bc5f; }

/* ---------- Форма контакта ---------- */
.qz-form-step { display: none; }
.qz-form-step.active { display: block; }

.qz-form-icon {
  width: 48px;
  height: 48px;
  background: var(--qz-green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--qz-green);
}

.qz-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 480px) {
  .qz-form-row { grid-template-columns: 1fr; }
}
.qz-form-field { margin-bottom: 10px; }
.qz-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 5px;
  font-weight: 500;
}
.qz-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: var(--qz-radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: #222;
  outline: none;
  transition: border-color 0.15s;
}
.qz-input:focus { border-color: var(--qz-green); }
.qz-input.error { border-color: #e24b4a; }

.qz-field-hint {
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
  line-height: 1.4;
  transition: color 0.15s;
}
.qz-field-hint.error-hint { color: #e24b4a; }

.qz-submit {
  width: 100%;
  background: var(--qz-green);
  border: none;
  border-radius: var(--qz-radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.qz-submit:hover { background: #36bc5f; }
.qz-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.qz-privacy {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}
.qz-privacy a { color: #aaa; }

/* ---------- Состояние загрузки ---------- */
.qz-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: qz-spin 0.7s linear infinite;
  display: none;
}
.qz-submit.loading .qz-spinner { display: block; }
.qz-submit.loading .qz-submit-text { display: none; }
@keyframes qz-spin { to { transform: rotate(360deg); } }

/* ---------- Экран успеха ---------- */
.qz-success { display: none; text-align: center; padding: 32px 24px; }
.qz-success.active { display: block; }
.qz-success-icon {
  width: 64px;
  height: 64px;
  background: var(--qz-green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
  color: var(--qz-green);
}
.qz-success h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}
.qz-success p {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  margin: 0 0 24px;
}
.qz-result-pkg {
  display: inline-block;
  background: var(--qz-green-bg);
  color: var(--qz-green-dark);
  border: 1px solid rgba(62,207,110,0.3);
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.qz-result-price {
  font-size: 13px;
  color: #888;
}

/* ---------- Адаптив ---------- */
@media (max-width: 600px) {
  .qz-modal { max-height: 95vh; }
  .qz-header { padding: 16px 16px 0; }
  .qz-progress-wrap { padding: 12px 16px 0; }
  .qz-body { padding: 16px; }
  .qz-header h2 { font-size: 16px; }
}

/*=============================*/

#inline_quiz .qz-overlay{
position: static;
    inset: unset;
        background: #121e36;
    z-index: unset;
    opacity: 1;
    pointer-events: all;
	    padding: 30px 0
}
#inline_quiz .qz-overlay .qz-modal{
	    width: 1300px;
    max-width: 100%;
	    transform: unset;
		    max-height: max-content;
}
#inline_quiz .qz-overlay .qz-modal{
	    background: #1c2b4a;
    border: 1px solid #32415e;
}
#inline_quiz  .qz-header h2,
#inline_quiz  .qz-q-title{
	    color: #fff;
}
#inline_quiz  .qz-opt {
    background: #283554;
	 border: 1px solid #32415e;
}
#inline_quiz .qz-opt-label{
	color: #fff;
}
#inline_quiz .qz-opt.selected .qz-opt-label {
        color: var(--qz-green-dark);
}
#inline_quiz .qz-opt.selected{
    background: #213f4e;
	 border: 1px solid #2a6a57;
}
#inline_quiz .qz-progress-meta,
#inline_quiz .qz-label,
#inline_quiz .qz-q-sub,
#inline_quiz .qz-opt-desc{
	color:#858d9e
}
#inline_quiz  #qzClose{
	display:none
}