/* ==========================================================================
   Önce Öğrenci — Gönüllü Başvuru modalı (4 adım)
   js/apply.js tarafından enjekte edilir; gönüllü / mentor aksiyonlarına bağlanır.
   ========================================================================== */

:root {
  --apply-navy: #06142c;
  --apply-navy-2: #10101b;
  --apply-red: var(--coral, #ef6142);
  --apply-red-deep: var(--coral-deep, #dd4c2c);
  --apply-red-light: #f2775d;
  --apply-salmon: #ff927c;
  --apply-red-soft: rgba(239, 97, 66, 0.14);
  --apply-border: rgba(239, 97, 66, 0.22);
  --apply-text-soft: rgba(255, 237, 233, 0.68);
}

.apply {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: clamp(10px, 2.4vw, 32px);
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.apply.is-open {
  opacity: 1;
  visibility: visible;
}

.apply__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 16, 0.74);
  backdrop-filter: blur(6px);
}

/* Flex kullanıyoruz: grid'de "height:auto + max-height" birleşimi satırları önce
   içeriğe göre boyutlayıp sonra kutuyu kırpıyor; iç kaydırma hiç oluşmuyordu. */
.apply__dialog {
  position: relative;
  display: flex;
  width: min(1120px, 100%);
  height: auto;
  max-height: min(880px, 100%);
  min-height: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--apply-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 72% 4%, rgba(239, 97, 66, 0.14), transparent 320px),
    radial-gradient(circle at 8% 96%, rgba(239, 97, 66, 0.1), transparent 260px),
    linear-gradient(160deg, var(--apply-navy) 0%, #0b0d19 54%, #170d12 100%);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.58);
  color: #fff;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.apply.is-open .apply__dialog {
  transform: none;
}

.apply__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.apply__close svg {
  width: 18px;
  height: 18px;
}

.apply__close:hover {
  background: rgba(239, 97, 66, 0.28);
  transform: rotate(90deg);
}

.apply .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
}

.apply .btn svg {
  width: 18px;
  height: 18px;
}

.apply .btn--apply-primary {
  color: #fff;
  background: var(--btn);
  box-shadow: var(--btn-golge);
}

.apply .btn--outline-dark {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.03);
}

.apply .btn--sm {
  min-height: 42px;
  padding-inline: 18px;
}

/* ------------------------------------------------------------- sol sütun */
/* Sol sütun yüksekliği belirlemesin: içerik mutlak konumlu bir katmanda durur,
   böylece diyalog boyu formun uzunluğuna göre ayarlanır (altta boşluk kalmaz). */
.apply__rail {
  position: relative;
  flex: 0 0 320px;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(70% 50% at 20% 6%, rgba(239, 97, 66, 0.18), transparent 66%),
    radial-gradient(85% 55% at 70% 22%, rgba(239, 97, 66, 0.1), transparent 70%),
    rgba(255, 255, 255, 0.02);
}

.apply__rail-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  overflow-y: auto;
}

.apply__rail-inner,
.apply__body,
.select-ui__list,
.date-picker {
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 97, 66, 0.62) rgba(255, 255, 255, 0.05);
}

.apply__rail-inner::-webkit-scrollbar,
.apply__body::-webkit-scrollbar,
.select-ui__list::-webkit-scrollbar,
.date-picker::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.apply__rail-inner::-webkit-scrollbar-track,
.apply__body::-webkit-scrollbar-track,
.select-ui__list::-webkit-scrollbar-track,
.date-picker::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.apply__rail-inner::-webkit-scrollbar-thumb,
.apply__body::-webkit-scrollbar-thumb,
.select-ui__list::-webkit-scrollbar-thumb,
.date-picker::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--apply-red);
}

.apply__rail-inner::-webkit-scrollbar-thumb:hover,
.apply__body::-webkit-scrollbar-thumb:hover {
  background: var(--apply-red-light);
}

.apply__rail .brand {
  margin: 0 0 26px;
}

.apply__rail h2 {
  font-size: 1.42rem;
  line-height: 1.22;
}

.apply__rail h2 em {
  color: var(--apply-salmon);
  font-style: normal;
}

.apply__rail-inner > p {
  margin-top: 14px;
  color: var(--apply-text-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

.apply__art {
  margin: 20px 0;
  height: clamp(110px, 18vh, 168px);
  flex: none;
  border-radius: 16px;
  background: #0a0a12 url("../image/hero-cosmos-4.svg") center 40% / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.apply__flow {
  margin-top: auto;
  flex: none;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.apply__flow h3 {
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.apply__flow ol {
  display: grid;
  gap: 14px;
}

.apply__flow li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
}

.apply__flow b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--apply-red-soft);
  color: var(--apply-salmon);
  font-size: 0.72rem;
  font-weight: 800;
}

.apply__flow strong {
  display: block;
  font-size: 0.88rem;
}

.apply__flow span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.79rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------- sağ sütun */
.apply__main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* sabit yükseklikli parçalar — yalnızca gövde esner */
.apply__kind,
.apply__steps,
.apply__actions,
.apply__done {
  flex: none;
}

/* hangi başvuru formunda olduğunu belirten rozet */
.apply__kind {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 26px 34px 0;
  padding: 6px 15px 6px 12px;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.apply__kind-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.apply__kind--gonullu {
  border-color: rgba(216, 86, 74, 0.45);
  background: rgba(201, 37, 27, 0.16);
  color: #f2a396;
}

.apply__kind--ogrenci {
  border-color: rgba(122, 162, 255, 0.4);
  background: rgba(72, 112, 214, 0.18);
  color: #a8c2ff;
}

/* adım göstergesi */
.apply__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 18px 34px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.apply__steps li {
  position: relative;
  text-align: center;
}

.apply__steps li::before {
  position: absolute;
  top: 17px;
  right: calc(50% + 22px);
  left: -50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  content: "";
}

.apply__steps li:first-child::before {
  display: none;
}

.apply__steps li.is-done::before {
  background: var(--apply-red);
}

.apply__steps b {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: #071733;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 800;
  transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.apply__steps li.is-active b {
  border-color: transparent;
  background: var(--btn);
  box-shadow: 0 0 0 5px rgba(239, 97, 66, 0.15);
  color: #fff;
}

.apply__steps li.is-done b {
  border-color: transparent;
  background: var(--apply-red);
  color: #fff;
}

.apply__steps span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.79rem;
  font-weight: 600;
}

.apply__steps li.is-active span {
  color: #fff;
}

/* form gövdesi */
.apply__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 34px 30px;
  overflow-x: hidden;
  overflow-y: auto;
}

.apply__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.apply__hint svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--apply-salmon);
}

.apply__step {
  display: none;
  animation: applyIn 0.34s ease both;
}

.apply__step.is-active {
  display: block;
}

@keyframes applyIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.apply__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.field {
  display: block;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.87rem;
  font-weight: 600;
}

.field .opt {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 500;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  /* textarea/select tarayıcı varsayılanında monospace'e düşüyor */
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.55;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 42px;
}

.field select option {
  color: #fff;
  background: #17141f;
}

.field select[data-enhanced] {
  position: absolute;
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(239, 97, 66, 0.72);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.field.has-error .dropzone,
.field.has-error .choice-row {
  border-color: rgba(255, 96, 80, 0.75);
}

/* eklenebilir satırlar (hedef üniversite / bölüm) */
.repeat {
  display: grid;
  gap: 10px;
}

.repeat__row {
  display: grid;
  grid-template-columns: 26px 1fr 1fr 44px;
  gap: 10px;
  align-items: center;
  animation: fieldIn 0.26s ease both;
}

.repeat__no {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.repeat__row input {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.repeat__row input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.repeat__row input:focus {
  border-color: var(--apply-border);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.field.has-error .repeat__row input:placeholder-shown {
  border-color: rgba(255, 96, 80, 0.7);
}

.repeat__remove {
  display: grid;
  width: 44px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.repeat__remove svg {
  width: 15px;
  height: 15px;
}

.repeat__remove:hover {
  border-color: rgba(255, 96, 80, 0.5);
  color: #ff9a8b;
  background: rgba(239, 97, 66, 0.14);
}

.repeat__add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 11px;
  color: var(--apply-salmon);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.repeat__add svg {
  width: 15px;
  height: 15px;
}

.repeat__add:hover {
  border-color: var(--apply-border);
  background: rgba(239, 97, 66, 0.1);
}

@media (max-width: 620px) {
  .repeat__row {
    grid-template-columns: 22px 1fr 44px;
    row-gap: 8px;
  }

  .repeat__row input:nth-of-type(2) {
    grid-column: 2 / -1;
  }
}

/* koşullu alan: yalnızca ilgili soruya "Evet" denince açılır */
.field--conditional {
  display: none;
}

.field--conditional.is-visible {
  display: block;
  animation: fieldIn 0.3s ease both;
}

@keyframes fieldIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* karakter sayacı */
.field__count {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.76rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: color 0.2s ease;
}

.field__count.is-near {
  color: #f0897b;
}

.field__error {
  display: none;
  margin-top: 7px;
  color: #ff9a8b;
  font-size: 0.79rem;
}

.field.has-error .field__error {
  display: block;
}

.field__status {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 650;
}

.field.is-valid input {
  border-color: rgba(74, 222, 128, 0.68);
}

.field.is-valid .field__status {
  color: #6ee7a8;
}

.field.is-invalid-live input {
  border-color: rgba(255, 96, 80, 0.78);
}

.field.is-invalid-live .field__status {
  color: #ff9a8b;
}

/* seçenek düğmeleri (evet / hayır) */
.choice-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice {
  position: relative;
  flex: 1 1 140px;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.choice input:checked + span {
  border-color: rgba(239, 97, 66, 0.62);
  background: var(--apply-red-soft);
  color: #fff;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--apply-salmon);
  outline-offset: 2px;
}

/* modern dropdown */
.select-ui {
  position: relative;
}

.select-ui__button {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 1fr 20px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.select-ui__button svg {
  color: rgba(255, 255, 255, 0.58);
  transition: transform 0.2s ease, color 0.2s ease;
}

.select-ui.has-value .select-ui__button {
  color: #fff;
}

.select-ui.is-open .select-ui__button,
.select-ui__button:focus-visible {
  border-color: rgba(239, 97, 66, 0.78);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(239, 97, 66, 0.13);
  outline: none;
}

.select-ui.is-open .select-ui__button svg {
  color: var(--apply-salmon);
  transform: rotate(180deg);
}

.select-ui__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 232px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(239, 97, 66, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 0, rgba(239, 97, 66, 0.13), transparent 180px),
    #10101b;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.38);
  /* kapalıyken düzenden tamamen çıkmalı; visibility:hidden kaydırma alanında
     yer kaplayıp form altında hayalet boşluk bırakıyordu */
  display: none;
}

.select-ui.is-open .select-ui__list {
  display: grid;
  animation: popIn 0.18s ease both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.select-ui__list button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  text-align: left;
  font-weight: 650;
}

.select-ui__list button:hover,
.select-ui__list button:focus-visible,
.select-ui__list button.is-selected {
  color: #fff;
  background: rgba(239, 97, 66, 0.18);
  outline: none;
}

/* modern date picker */
.date-ui {
  position: relative;
}

.date-ui input {
  padding-right: 48px;
}

.date-ui__button {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-50%);
  transition: color 0.2s ease, background 0.2s ease;
}

.date-ui__button:hover,
.date-ui.is-open .date-ui__button {
  color: var(--apply-salmon);
  background: rgba(239, 97, 66, 0.13);
}

.date-picker {
  position: absolute;
  z-index: 22;
  top: calc(100% + 8px);
  left: 0;
  width: min(330px, 100%);
  padding: 14px;
  border: 1px solid rgba(239, 97, 66, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 0, rgba(239, 97, 66, 0.13), transparent 160px),
    #10101b;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.4);
  display: none; /* aynı sebep: kapalı takvim düzende yer kaplamamalı */
}

.date-ui.is-open .date-picker {
  display: block;
  animation: popIn 0.18s ease both;
}

.date-picker__head {
  display: grid;
  grid-template-columns: 30px 30px 1fr 30px 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.date-picker__head strong {
  color: #fff;
  font-size: 0.92rem;
  text-align: center;
}

.date-picker__head button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.28rem;
  line-height: 1;
}

.date-picker__head button:hover {
  border-color: rgba(239, 97, 66, 0.4);
  background: rgba(239, 97, 66, 0.14);
}

.date-picker__week,
.date-picker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.date-picker__week {
  margin-bottom: 7px;
}

.date-picker__week span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.date-picker__days button,
.date-picker__days span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-size: 0.83rem;
  font-weight: 750;
}

.date-picker__days button:hover,
.date-picker__days button:focus-visible {
  color: #fff;
  background: rgba(239, 97, 66, 0.16);
  outline: none;
}

.date-picker__days button.is-selected {
  color: #fff;
  background: var(--btn);
  box-shadow: 0 8px 20px rgba(239, 97, 66, 0.22);
}

.date-picker__days button:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.2);
}

/* fotoğraf yükleme */
.dropzone {
  display: grid;
  min-height: 196px;
  padding: 22px;
  place-items: center;
  border: 1.6px dashed rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: rgba(239, 97, 66, 0.68);
  background: rgba(239, 97, 66, 0.1);
}

.dropzone input {
  display: none;
}

.dropzone__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--apply-red-soft);
  color: var(--apply-salmon);
}

.dropzone__icon svg {
  width: 26px;
  height: 26px;
}

.dropzone p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.dropzone p b {
  color: var(--apply-salmon);
  font-weight: 700;
}

.dropzone small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.77rem;
}

.dropzone__preview {
  display: none;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
}

.dropzone.has-file .dropzone__preview {
  display: flex;
}

.dropzone.has-file .dropzone__empty {
  display: none;
}

.dropzone__preview img {
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
}

.dropzone__preview strong {
  display: block;
  font-size: 0.88rem;
  word-break: break-all;
}

.dropzone__preview small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.45);
}

/* onay kutuları */
.consent {
  display: grid;
  gap: 12px;
}

.consent label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.consent label:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--apply-red);
}

.consent span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.87rem;
  line-height: 1.55;
}

.consent label:has(input:checked) {
  border-color: rgba(239, 97, 66, 0.5);
  background: rgba(239, 97, 66, 0.1);
}

/* özet */
.summary {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.summary h4 {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.summary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0;
  font-size: 0.85rem;
}

.summary dt {
  color: rgba(255, 255, 255, 0.45);
}

.summary dd {
  margin: 0;
  color: #fff;
  word-break: break-word;
}

/* alt aksiyonlar */
.apply__actions {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  padding: 20px 34px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.apply__actions .btn {
  width: 100%;
}

/* teşekkür ekranı */
.apply__done {
  display: none;
  padding: 60px 34px;
  text-align: center;
}

.apply.is-done .apply__done {
  display: block;
}

.apply.is-done .apply__steps,
.apply.is-done .apply__body,
.apply.is-done .apply__actions {
  display: none;
}

.apply__done-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.apply__done-icon svg {
  width: 34px;
  height: 34px;
}

.apply__done h3 {
  font-size: 1.4rem;
}

.apply__done p {
  margin: 14px auto 26px;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.93rem;
}

/* ------------------------------------------------------------- duyarlı */
@media (max-width: 980px) {
  .apply__dialog {
    flex-direction: column;
    max-height: 94vh;
  }

  .apply__rail {
    flex: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* tek sütuna düşünce sol blok kendi yüksekliğini belirlesin */
  .apply__rail-inner {
    position: static;
    padding: 26px 24px 22px;
    overflow: visible;
  }

  .apply__art,
  .apply__flow {
    display: none;
  }

  .apply__rail h2 {
    max-width: 22ch;
    font-size: 1.24rem;
  }

  .apply__kind {
    margin: 20px 24px 0;
  }

  .apply__steps {
    padding: 14px 24px 18px;
  }

  .apply__steps span {
    font-size: 0.72rem;
  }

  .apply__body {
    padding: 20px 24px 26px;
  }

  .apply__actions {
    padding: 16px 24px 22px;
  }
}

@media (max-width: 620px) {
  .apply {
    padding: 0;
  }

  .apply__dialog {
    max-height: 100vh;
    height: 100vh;
    /* dvh: mobil tarayıcıda adres çubuğu açılıp kapanınca taşmayı önler */
    max-height: 100dvh;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .apply__rail-inner > p {
    display: none;
  }

  .apply__rail-inner {
    padding: 22px 18px 18px;
  }

  .apply__rail h2 {
    font-size: 1.1rem;
  }

  .apply__close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .apply__kind {
    margin: 16px 18px 0;
    padding: 5px 12px 5px 10px;
    font-size: 0.66rem;
  }

  .apply__steps {
    padding: 12px 12px 14px;
  }

  .apply__steps b {
    width: 30px;
    height: 30px;
    margin-bottom: 7px;
    font-size: 0.78rem;
  }

  .apply__steps li::before {
    top: 14px;
    right: calc(50% + 19px);
  }

  .apply__steps span {
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .apply__body {
    padding: 18px 18px 24px;
  }

  .apply__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .apply__actions {
    grid-template-columns: 1fr;
    padding: 14px 18px 20px;
  }

  .apply__actions .btn:first-child {
    order: 2;
  }

  .dropzone {
    min-height: 168px;
  }

  .summary dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .summary dd {
    margin-bottom: 8px;
  }
}

/* yer yoksa panel yukarı doğru açılır */
.date-ui.is-up .date-picker {
  top: auto;
  bottom: calc(100% + 8px);
}

.select-ui.is-up .select-ui__list {
  top: auto;
  bottom: calc(100% + 8px);
}

.date-picker {
  max-height: min(360px, 62vh);
  overflow-y: auto;
}

/* --- gönderim hatası ve uzun listelerde arama (backend bağlantısı) */
.apply__error {
  flex: 1 1 100%;
  margin: 0 0 6px;
  padding: 10px 14px;
  border: 1px solid rgba(239, 97, 66, 0.35);
  border-radius: 12px;
  background: rgba(239, 97, 66, 0.08);
  color: #b3361a;
  font-size: 13.5px;
  line-height: 1.45;
}

.apply__error[hidden] {
  display: none;
}

.select-ui__search {
  position: sticky;
  top: -8px;
  z-index: 1;
  width: 100%;
  margin: -8px 0 6px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.select-ui__list [role="option"][hidden] {
  display: none;
}

.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}
