/* === GOOGLE FONT IMPORT (Poppins) === */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");

/* === TEMEL AYARLAR ve TİPOGRAFİ === */
html {
  font-size: 112.5%; /* 1rem = 18px */
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f8f9fa;
  color: #343a40;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
}

/* Eklenti sarmalayıcısı */
.bach-testi-wrapper {
  max-width: 800px;
  margin: 2em auto;
  padding: 1.5em;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

/* === BAŞLIKLAR === */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.3;
  color: #212529;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
}

.bach-testi-wrapper > h2:not(.bach-test-header h2) {
  text-align: center;
  font-size: clamp(1.8rem, 1.2rem + 2.5vw, 2.8rem);
  margin-top: 0;
  margin-bottom: 1em;
  color: #6a5adf;
}

.bach-test-header {
  margin-bottom: 1.5em;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 1em;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  justify-content: center;
  text-align: center;
  background-color: #6a5adf;
}
.bach-test-header h2 {
  margin: 0;
  width: 100%;
  padding: 0.5em;
  line-height: 1.4;
  z-index: 1;
  position: relative;
  font-family: "Poppins", sans-serif;
  font-size: 1.8rem;
  color: #ffffff;
}

#instructions h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  color: #6a5adf;
  margin-top: 0;
  margin-bottom: 0.6em;
  border-bottom: none;
  padding-bottom: 0;
  text-align: left;
}

#user-info-form h3 {
  font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem);
  color: #6a5adf;
  margin-top: 0;
  margin-bottom: 0.8em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.4em;
  text-align: left;
}

.remedy-section h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: #6a5adf;
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.4em;
  text-align: left;
}

/* === PARAGRAF ve LİSTELER === */
p,
ol,
ul {
  text-align: left;
}
p,
ol {
  margin-bottom: 1em;
}
.remedy-section ul {
  list-style: none;
  padding: 0;
  margin: 15px 0 1em 0;
}
#instructions ol {
  padding-left: 1.5em;
  margin-top: 0.5em;
}
#instructions .instructions-content p {
  margin-bottom: 0.8em;
}
#instructions .instructions-content p:last-child {
  margin-bottom: 0;
}
li.remedy-indicator-item {
  margin-bottom: 0.8em;
  list-style: none !important;
  padding: 0 !important;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
} /* Margin sıfırlandı */
li:not(.remedy-indicator-item) {
  margin-bottom: 0.5em;
}

/* === SORU GÖSTERGE BUTON GÖRÜNÜMÜ === */
.remedy-indicator-item {
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  /*background: linear-gradient(180deg, #896efd 0, #6b4afc 100%);*/
  background-color: #f1f1f1;
  box-shadow: 2px 1px 2px rgba(180, 180, 180, 0.7),
    inset 3px 2px 5px rgba(255, 255, 255, 1);
  overflow: hidden;
  transition: background-image 0.2s ease, border-color 0.2s ease,
    box-shadow 0.15s ease-in-out;
  cursor: pointer;
}
.remedy-indicator-item:hover {
  /*background-image: linear-gradient(to bottom, #f9f9f9 0%, #f0f0f0 100%);*/
  background-color: #f1f1f1;
  box-shadow: -2px -1px 2px rgba(180, 180, 180, 0.3),
    inset -3px -2px 3px rgba(255, 255, 255, 0.7);

  /*border-color: #b0b0b0;*/
  
}
.remedy-indicator-item.is-selected {
  /*background-image: linear-gradient(to bottom, #b1e2be 0%, #a6dfaa 100%);*/
  border-color: rgba(0, 220, 130, 0.5);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: rgba(0, 220, 130, 0.5) 0px 0px 10px 0px,
    rgba(54, 228, 218, 0.5) 0px 0px 20px 0px;
}
.remedy-indicator-item.is-selected .remedy-indicator-label {
  color: #ffffff; /* Dinamik stilin !important ile bunu ezmesi GEREKİR */
}
.remedy-indicator-item.is-selected .remedy-indicator-label .indicator-text {
  font-weight: 500;
}

/* LABEL AYARLARI */
.remedy-indicator-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  padding: 0.8em 1.2em;
  margin: 0;
  /*font-size: 0.95em; /* <<< !important KALDIRILDI! */
  text-align: left;
  justify-content: flex-start;
  flex-direction: row;
  /* PHP'den gelen stilin bunu ezmesi beklenir */
}

/* CHECKBOX GİZLEME */
.remedy-indicator-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}
.remedy-indicator-label .indicator-text {
  flex-grow: 1;
}

/* === DİĞER ELEMENTLER === */
#instructions {
  border-left: 5px solid #6a5adf;
  padding: 1.2em;
  margin-bottom: 2em;
  border-radius: 4px;
  background-color: #f0eefa;
  text-align: left;
}
#instructions .instructions-content {
  margin-top: 0.8em;
}
#user-info-form {
  margin-bottom: 1.5em;
  padding: 1em;
  border: 1px solid #eee;
  border-radius: 5px;
  background-color: #f9f9f9;
  text-align: left;
}
.remedy-section {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 1.2em 1.5em;
  margin-bottom: 1em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s ease, background-color 0.3s ease;
  background-color: #fff;
}

/* === UYARI STİLLERİ === */
.remedy-section.indicator-limit-exceeded {
  border-color: #ff90a3 !important;
  background-color: #fff0f3 !important;
}
.indicator-warning {
  display: none;
  color: #d63384;
  font-size: 0.9em;
  margin-top: 0.6em;
  font-weight: bold;
}
.indicator-warning.visible {
  display: block;
}
#total-limit-feedback {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ff90a3 !important;
  color: #481f2f !important;
  padding: 1.2em 1.8em !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4) !important;
  z-index: 1050 !important;
  text-align: center !important;
  font-weight: bold !important;
  min-width: 400px !important;
  max-width: 90% !important;
  box-sizing: border-box !important;
  font-size: 1rem !important;
}

/* === SONUÇ ALANI VE BUTON === */
#results-area {
  margin-top: 2em;
  padding: 1.5em;
  background-color: #f0eefa;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
}
#submit-results-btn {
  background-color: #6a5adf;
  color: white;
  padding: 0.8em 1.8em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.5;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  margin: 0.3em;
  opacity: 1;
  font-weight: 500;
}
#submit-results-btn:hover {
  background-color: #5a4ccd;
}
#submit-results-btn:disabled {
  background-color: #999;
  cursor: not-allowed;
}
#action-buttons {
  margin-top: 1em;
  visibility: hidden;
  opacity: 0;
}
#action-buttons.visible {
  visibility: visible;
  opacity: 1;
}

/* === GERİ BİLDİRİM ALANI === */
#feedback {
  margin-top: 1.5em;
  font-weight: 400;
  padding: 1em;
  border-radius: 4px;
  text-align: left;
  min-height: 2.5em;
  border: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  font-size: 0.95em;
}
#feedback.warning {
  background-color: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}
#feedback.success {
  background-color: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}
#feedback ul {
  list-style: disc;
  margin-top: 0.5em;
  margin-bottom: 0;
  padding-left: 1.5em;
}
#feedback h4 {
  font-size: 1.1em;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.6em;
}
#feedback p {
  margin-top: 0;
  margin-bottom: 0.4em;
}

/* === MOBİL UYUMLULUK === */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  .bach-testi-wrapper {
    padding: 1em;
    margin: 1em auto;
  }
  .remedy-section {
    padding: 1.2em 0.75em;
  }
}
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  #submit-results-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9em 0.5em;
  }
  #user-info-form input[type="text"],
  #user-info-form input[type="email"],
  #user-info-form input[type="tel"],
  #user-info-form textarea {
    width: 90% !important;
  }
  #total-limit-feedback {
    min-width: 90% !important;
    width: 90% !important;
  }
}

/* === YAZDIRMA STİLLERİ === */
@media print {
  html {
    font-size: 100%;
  }
  body {
    font-family: "Times New Roman", Times, serif;
    background-color: #fff !important;
    color: #000 !important;
    margin: 0.75in;
    font-size: 0.92rem;
    line-height: 1.4;
    padding: 0 !important;
  }
  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  ol,
  li,
  .bach-testi-wrapper,
  #instructions,
  .remedy-section,
  #user-info-form,
  #results-area,
  #total-limit-feedback,
  #feedback,
  #action-buttons,
  #submit-results-btn,
  label,
  input,
  span,
  small,
  .bach-test-header {
    display: none !important;
  }
}
