/* Checkbox grid that replaces the native <select> on the application forms.
   Surfaces are neutral white washes, never gold-tinted — gold stays as the border, the check mark
   and the focus ring only (owner's standing rule, memory: owner-visual-rules-2026-10-02).
   Washes are rgba, not opaque near-navy, because bai-motion.js flattens opaque panels at load. */

.bai-ms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0 0;
}

@media (min-width: 720px) {
  .bai-ms { grid-template-columns: 1fr 1fr; gap: 8px 14px; }
}

/* the original control stays in the DOM as the no-JS fallback; hide it without display:none so it
   keeps a layout box of zero and stays out of the tab order via tabindex="-1" */
select.bai-ms__src {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.bai-ms__opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;            /* touch target */
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: #D7DEEC;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.bai-ms__cb {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.bai-ms__box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid rgba(255, 255, 255, .34);
  border-radius: 6px;
  position: relative;
  transition: border-color .18s ease, background-color .18s ease;
}

.bai-ms__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 7px;
  height: 11px;
  border-right: 2px solid #16233F;
  border-bottom: 2px solid #16233F;
  transform: rotate(40deg) scale(.5);
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
}

.bai-ms__txt { flex: 1 1 auto; }

/* checked: neutral wash on the row, gold only on the small box and the border */
.bai-ms__cb:checked ~ .bai-ms__box {
  background: #E7C77E;
  border-color: #E7C77E;
}

.bai-ms__cb:checked ~ .bai-ms__box::after {
  opacity: 1;
  transform: rotate(40deg) scale(1);
}

.bai-ms__opt:has(.bai-ms__cb:checked) {
  border-color: rgba(231, 199, 126, .55);
  background: rgba(255, 255, 255, .09);
  color: #FFFFFF;
}

.bai-ms__cb:focus-visible ~ .bai-ms__box {
  outline: 2px solid #E7C77E;
  outline-offset: 2px;
}

@media (hover: hover) {
  .bai-ms__opt:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); }
}

/* hover is dead on phones (memory: mobile-touch-tier) — give a press state instead */
.bai-ms__opt:active { background: rgba(255, 255, 255, .12); }

/* scoped + !important like the rest of the site's form CSS: the theme zeroes paragraph margins
   inside .srfm-form-container, which collapsed this line onto the last option */
.srfm-form-container .bai-ms__count {
  display: block;
  margin: 10px 0 0 !important;
  font-size: 13px;
  line-height: 1.3;
  color: #9FB0CE;
}

.srfm-form-container .bai-ms__hint { margin-bottom: 2px !important; }

/* the conditional "Diğer" detail field */
.srfm-form-container [data-bai-other-for][hidden] { display: none !important; }

.bai-ms-other--on {
  animation: baiMsIn .22s ease both;
}

@keyframes baiMsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .bai-ms-other--on { animation: none; }
  .bai-ms__opt, .bai-ms__box, .bai-ms__box::after { transition: none; }
}
