/* Quiz Popup Styles */
:root {
  --derun-toprak: #5c4d44;
  --doga-yesil: #7c9a6d;
  --krem-bg: #f9f9f9;
}

/* Floating Button */
.quiz-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--doga-yesil);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  animation: slideInUp 0.5s ease-out;
}

.quiz-floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background-color: #6a855d;
}

.quiz-floating-btn svg {
  width: 20px;
  height: 20px;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress Bar */
.quiz-progress-container {
  margin-bottom: 20px;
  padding: 0 10px;
}

.quiz-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--derun-toprak);
  margin-bottom: 6px;
  font-weight: 600;
}

.quiz-progress-track {
  width: 100%;
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background-color: var(--doga-yesil);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quiz Container & Table Layout */
.quiz-container {
  text-align: left;
  max-height: 60vh; /* Reduced slightly to accommodate progress bar */
  overflow-y: auto;
  padding: 0 5px;
  font-family: "Inter", sans-serif;
}

/* Header Row Styling */
.quiz-header-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 10px;
  margin-bottom: 10px; /* Space between header and first row */
  font-weight: 600;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
  color: white;
}

/* Header Cells specific styling */
.quiz-header-row > div {
  padding: 15px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header Colors */
.quiz-header-row > div:nth-child(1) {
  background-color: var(--doga-yesil);
} /* # */
.quiz-header-row > div:nth-child(2) {
  background-color: #3c493c;
} /* A */
.quiz-header-row > div:nth-child(3) {
  background-color: #ffbd59;
  color: #333;
} /* B - Dark text for contrast */
.quiz-header-row > div:nth-child(4) {
  background-color: #ff914d;
} /* C */
.quiz-header-row > div:nth-child(5) {
  background-color: #636282;
} /* D */

.quiz-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #eee;
  align-items: stretch; /* Stretch to fill height */
  background: #fff;
  transition: background 0.2s;
}

.quiz-row:nth-child(even) {
  background-color: #fcfcfc;
}

.quiz-row:hover {
  background-color: #f5fcf5;
}

.quiz-num {
  font-weight: 700;
  color: var(--derun-toprak);
  font-family: "Playfair Display", serif;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cell Styling with Backgrounds */
.quiz-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  justify-content: center;
}

/* Column Background Colors */
.quiz-row .quiz-cell:nth-child(2) {
  background-color: #dbeedb;
} /* A */
.quiz-row .quiz-cell:nth-child(3) {
  background-color: #ffddab;
} /* B */
.quiz-row .quiz-cell:nth-child(4) {
  background-color: #ffc29d;
} /* C */
.quiz-row .quiz-cell:nth-child(5) {
  background-color: #bcbbcb;
} /* D */

.quiz-option-text {
  font-size: 13px;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  min-height: 34px;
  display: flex;
  align-items: center;
}

.quiz-select {
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  width: 100%;
  color: #333;
  cursor: pointer;
  font-weight: 500;
}

.quiz-select:focus {
  border-color: var(--doga-yesil);
  background-color: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 154, 109, 0.2);
}

.quiz-select.error {
  border-color: #dc3545;
  background-color: #fff8f8;
}

/* Mobile Layout */
@media (max-width: 768px) {
  .quiz-header-row {
    display: none;
  }

  .quiz-row {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  }

  .quiz-num {
    justify-content: flex-start;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 5px;
  }

  .quiz-cell {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 15px;
    /* Keep background colors on mobile too for identification */
  }

  .quiz-option-text {
    min-height: auto;
    margin-bottom: 0;
    font-size: 14px;
  }
}

/* Scrollbar */
.quiz-container::-webkit-scrollbar {
  width: 6px;
}
.quiz-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.quiz-container::-webkit-scrollbar-thumb {
  background: #d1d1d1;
  border-radius: 3px;
}

/* Checkbox for "Don't show again" */
.dont-show-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  font-size: 13px;
  color: #666;
}
.dont-show-container input {
  margin-right: 8px;
}

/* Modal Form Styles */
.swal-custom-form .form-group {
  margin-bottom: 15px;
  text-align: left;
}
.swal-custom-form .form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 14px;
  color: var(--derun-toprak);
}
.swal-custom-form .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}
.swal-custom-form .form-input:focus {
  border-color: var(--doga-yesil);
  outline: none;
}
