/* =====================================================
   FMGQF Frontend - Premium quiz UI
   Place: assets/css/frontend.css
   ===================================================== */

/* Root container */
.fmgqf-quiz {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  max-width: 840px;
  margin: 18px auto;
  color: #0f172a;
  line-height: 1.45;
}

/* Card */
.fmgqf-quiz .fmgqf-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 22px;
  border: 1px solid #e6eef7;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.04);
}

/* Title and description */
.fmgqf-quiz .fmgqf-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.fmgqf-quiz .fmgq-desc {
  font-size: 14px;
  color: #475569;
  margin-bottom: 16px;
}

/* Progress bar */
.fmgqf-progress {
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  /* overflow: hidden; */
  margin-bottom: 30px;
  position: relative;
}
.fmgqf-progress .bar {
  position: absolute;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38ae65, #38ae65);
  transition: width 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
  top: 0;
  left: 0;
  border-radius: 999px;
}
.fmgqf-counter {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}
/* Question block */
.fmgqf-question {
  margin-bottom: 18px;
}
.fmgqf-question h3 {
  font-size: 1.8rem;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 25px;
  color: #004c2e;
}

/* Answers grid */
.fmgqf-answers {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fmgqf-answers li {
  background-color: #fff;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-radius: 0 8px 0 8px;
  box-shadow: 0 1px 23px 1px rgba(0, 0, 0, 0.07),
    inset 4px 0 0 0 rgb(56 174 101);
}
.fmgqf-answers li label {
  cursor: pointer;
  padding: 22px 25px;
  width: 100%;
}
.fmgqf-answers li:hover {
  background-color: rgb(56 174 101);
  transform: translateY(-2px);
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); */
  box-shadow: 0 1px 23px 1px rgba(0, 0, 0, 0.07),
    inset 4px 0 0 0 rgb(255 255 255);
}
.fmgqf-answers li:hover label span {
  color: #fff;
}
.fmgqf-answers input[type="radio"] {
  display: none;
}

.fmgqf-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e6eef7;
  background: #fbfdff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.fmgqf-answer:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(13, 18, 23, 0.06);
  background: #ffffff;
}
.fmgqf-answer input[type="radio"],
.fmgqf-answer input[type="checkbox"] {
  accent-color: #2563eb;
  width: 20px;
  height: 20px;
}

/* Answer text */
.fmgqf-answer .label {
  font-size: 14px;
  color: #0f172a;
}

/* Submit / next buttons */
.fmgqf-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
}
.fmgqf-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}
.fmgqf-btn-primary {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  color: #fff;
}
.fmgqf-btn-ghost {
  background: transparent;
  border: 1px solid #e6eef7;
  color: #0f172a;
}

/* Result card */
.fmgqf-result {
  padding: 22px;
	line-height:1.3;
  border-radius: 10px;
  border: 1px solid #e6eef7;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.fmgqf-result h3 {
  font-size: 18px;
  margin: 6px 0 8px;
  font-weight: 700;
}
.fmgqf-result p {
  font-size: 16px;
  margin: 20px 0;
}
.fmgqf-btn-primary {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.fmgqf-result h4 {
  font-size: 18px;
  margin: 6px 0 8px;
  font-weight: 700;
}

/* Loading overlay (while submitting) */
.fmgqf-quiz.loading::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  z-index: 9999;
  backdrop-filter: blur(3px);
}

/* Smooth slide transitions */
.fmgqf-question {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fmgqf-result-description img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.fmgqf-result-description p {
  margin: 10px 0;
  line-height: 1.6;
}
.fmgqf-result-image img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}
.fmgqf-answers label.fmgqf-active {
  background: #38ae6536;
  border-color: #38ae65;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.fmgqf-answers input[type="radio"] {
  display: none;
}
@media only screen and (max-width: 480px) {
  .fmgqf-question h3 {
    font-size: 20px;
  }
  .fmgqf-answers li label {
    padding: 12px 10px;
  }
  .fmgqf-form {
    padding: 10px 0 0 !important;
    max-width: 100% !important;
    width: 100%;
    margin: 0 !important;
  }
  .fmgqf-user-form input[type="text"],
  .fmgqf-user-form input[type="email"] {
    width: 90% !important;
  }
}
