/* =========================================================
   IEM YATIRIM ASİSTANI - ADA ARAYÜZÜ
   Mevcut hesaplama / AJAX motoruna dokunmaz.
========================================================= */

.iem-ya,
.iem-ya * {
  box-sizing: border-box;
}

.iem-ya {
  --ada-blue: #0d4d78;
  --ada-blue-dark: #073a5c;
  --ada-cyan: #3dbfe9;
  --ada-text: #17212f;
  --ada-muted: #6d7888;
  --ada-line: rgba(15, 23, 42, 0.08);
  --ada-soft: #f5f8fb;
  --ada-card: #ffffff;
  --ada-danger: #b42318;

  width: min(860px, 100%);
  margin: 0 auto;
  color: var(--ada-text);
}

.iem-ya__shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(13, 77, 120, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 5%, rgba(61, 191, 233, 0.10), transparent 25%),
    radial-gradient(circle at 4% 2%, rgba(13, 77, 120, 0.08), transparent 28%),
    #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
}

/* =========================================================
   ADA HEADER
========================================================= */

.iem-ya__adaHeader {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 22px 26px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 10%, rgba(82, 207, 244, 0.22), transparent 32%),
    linear-gradient(135deg, #073a5c 0%, #0d4d78 58%, #0b648e 100%);
}

.iem-ya__adaHeader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(255,255,255,.12), transparent 36%, rgba(255,255,255,.05));
}

.iem-ya__adaAvatar {
  position: relative;
  z-index: 2;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iem-ya__adaGlow {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(67, 196, 235, 0.25);
  box-shadow: 0 0 0 8px rgba(79, 201, 240, 0.07), 0 0 28px rgba(88, 210, 247, 0.32);
  animation: iemYaAdaPulse 3s ease-in-out infinite;
}

.iem-ya__adaImage {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.18));
}

.iem-ya__adaStatus {
  position: absolute;
  z-index: 4;
  right: 3px;
  bottom: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #37d879;
  border: 3px solid #fff;
}

.iem-ya__adaIdentity {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.iem-ya__adaEyebrow {
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.iem-ya__title {
  margin: 0;
  color: #fff;
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -.035em;
}

.iem-ya__adaState {
  margin: 7px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  line-height: 1.35;
}

.iem-ya__intro {
  padding: 22px 26px 0;
}

.iem-ya__desc {
  max-width: 680px;
  margin: 0;
  color: var(--ada-muted);
  font-size: 13px;
  line-height: 1.65;
}

/* =========================================================
   APP + PROGRESS
========================================================= */

.iem-ya__app,
.iem-ya__result {
  padding: 18px 26px 24px;
}

.iem-ya__progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}

.iem-ya__progressDots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  flex: 1;
}

.iem-ya__progressDots span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(13, 77, 120, 0.09);
  transition: background .2s ease, transform .2s ease;
}

.iem-ya__progressDots span.is-active {
  background: linear-gradient(90deg, #0d4d78, #36add8);
}

.iem-ya__progressmeta {
  min-width: 40px;
  color: var(--ada-muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

/* =========================================================
   ADA CONVERSATION
========================================================= */

.iem-ya__conversation {
  display: grid;
  gap: 14px;
}

.iem-ya__bubble {
  position: relative;
  max-width: 92%;
  padding: 17px 18px;
  border-radius: 7px 20px 20px 20px;
  background: linear-gradient(145deg, #eef6fa, #f7fbfd);
  border: 1px solid rgba(13, 77, 120, 0.08);
}

.iem-ya__bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  width: 14px;
  height: 14px;
  background: #eef6fa;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.iem-ya__bubbleLabel {
  display: block;
  margin-bottom: 6px;
  color: var(--ada-blue);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.iem-ya__stepTitle {
  color: var(--ada-text);
  font-size: 21px;
  font-weight: 820;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.iem-ya__note {
  margin-top: 6px;
  color: var(--ada-muted);
  font-size: 12px;
  line-height: 1.55;
}

.iem-ya__stepCard {
  padding: 20px;
  border: 1px solid var(--ada-line);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 30px rgba(15,23,42,.055);
}

.iem-ya__stepEyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--ada-blue);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .10em;
  text-transform: uppercase;
}

/* =========================================================
   BUDGET INPUTS
========================================================= */

.iem-ya__budgetGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.iem-ya__field {
  min-width: 0;
}

.iem-ya__field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ada-muted);
  font-size: 11px;
  font-weight: 750;
}

.iem-ya__inputWrap {
  position: relative;
}

.iem-ya__inputWrap input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 14px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 15px;
  outline: 0;
  background: #fff;
  color: var(--ada-text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 5px 14px rgba(15,23,42,.035);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.iem-ya__inputWrap input:focus {
  border-color: rgba(13,77,120,.42);
  box-shadow: 0 0 0 4px rgba(13,77,120,.07);
}

.iem-ya__inputWrap > span {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ada-muted);
  font-size: 10px;
  font-weight: 850;
}

.iem-ya__hint {
  margin-top: 11px;
  color: var(--ada-muted);
  font-size: 10px;
  line-height: 1.5;
}

/* =========================================================
   RADIO / CHOICE CARDS
========================================================= */

.iem-ya__radios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.iem-ya__radio {
  position: relative;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid rgba(15,23,42,.09);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.iem-ya__radio:hover {
  transform: translateY(-1px);
  border-color: rgba(13,77,120,.20);
  box-shadow: 0 8px 20px rgba(15,23,42,.055);
}

.iem-ya__radio.is-selected {
  border-color: rgba(13,77,120,.38);
  background: linear-gradient(145deg, rgba(13,77,120,.055), rgba(61,191,233,.045));
  box-shadow: 0 0 0 3px rgba(13,77,120,.045);
}

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

.iem-ya__radioMark {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  border: 2px solid rgba(13,77,120,.28);
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
  transition: background .18s ease, border-color .18s ease;
}

.iem-ya__radio.is-selected .iem-ya__radioMark {
  border-color: var(--ada-blue);
  background: var(--ada-blue);
}

.iem-ya__radioCopy {
  min-width: 0;
}

.iem-ya__radioCopy strong {
  display: block;
  color: var(--ada-text);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
}

.iem-ya__radioCopy small {
  display: block;
  margin-top: 3px;
  color: var(--ada-muted);
  font-size: 9.5px;
  line-height: 1.35;
}

/* =========================================================
   ACTIONS
========================================================= */

.iem-ya__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.iem-ya__actions--center {
  justify-content: center;
}

.iem-ya__btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d4d78, #0b6c99);
  color: #fff !important;
  text-decoration: none !important;
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(13,77,120,.18);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.iem-ya__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(13,77,120,.23);
}

.iem-ya__btn:active {
  transform: scale(.98);
}

.iem-ya__btn[disabled] {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
}

.iem-ya__btn--ghost {
  background: rgba(255,255,255,.88);
  color: var(--ada-blue) !important;
  border: 1px solid rgba(13,77,120,.14);
  box-shadow: 0 6px 16px rgba(15,23,42,.04);
}

.iem-ya__loadingDots {
  letter-spacing: 2px;
}

/* =========================================================
   ERROR
========================================================= */

.iem-ya__error {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(180,35,24,.14);
  border-radius: 13px;
  background: rgba(180,35,24,.055);
  color: var(--ada-danger);
  font-size: 11px;
  line-height: 1.45;
}

/* =========================================================
   RESULT INTRO
========================================================= */

.iem-ya__resultIntro {
  position: relative;
  padding: 18px 18px 18px 82px;
  margin-bottom: 14px;
  border: 1px solid rgba(13,77,120,.09);
  border-radius: 20px;
  background: linear-gradient(145deg, #eef6fa, #f8fbfd);
}

.iem-ya__resultAda {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #0d4d78, #0a719f);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(13,77,120,.18);
}

.iem-ya__resultIntro h4 {
  margin: 3px 0 5px;
  color: var(--ada-text);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.iem-ya__resultIntro p {
  margin: 0;
  color: var(--ada-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

/* =========================================================
   RESULTS
========================================================= */

.iem-ya__results {
  display: grid;
  gap: 12px;
}

.iem-ya__resultItem {
  padding: 15px;
  border: 1px solid rgba(15,23,42,.075);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.iem-ya__resultItem:hover {
  transform: translateY(-2px);
  border-color: rgba(13,77,120,.14);
  box-shadow: 0 14px 32px rgba(15,23,42,.085);
}

.iem-ya__resultTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.iem-ya__resultMain {
  flex: 1;
  min-width: 0;
}

.iem-ya__resultTitle {
  margin-bottom: 9px;
  color: var(--ada-text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.iem-ya__resultMeta {
  display: grid;
  gap: 5px;
  color: var(--ada-muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.iem-ya__resultMeta strong {
  color: var(--ada-text);
}

.iem-ya__resultThumb {
  flex: 0 0 168px;
  width: 168px;
  height: 126px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.07);
  border-radius: 15px;
  background: #edf2f5;
}

.iem-ya__resultThumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iem-ya__investmentBox {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(13,77,120,.10);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(13,77,120,.045), rgba(61,191,233,.04));
}

.iem-ya__investmentLabel {
  color: var(--ada-muted);
  font-size: 10.5px;
}

.iem-ya__investmentLabel strong {
  color: var(--ada-blue);
  font-size: 12px;
}

.iem-ya__bar {
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13,77,120,.08);
}

.iem-ya__barFill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d4d78, #37b8e2);
}

.iem-ya__partialMeta {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #f7f9fb;
}

.iem-ya__resultActions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.iem-ya__resultActions .iem-ya__btn {
  min-height: 40px;
  padding: 0 13px;
  font-size: 10px;
}

.iem-ya__resultControls {
  justify-content: flex-start;
  margin-top: 16px;
}

/* =========================================================
   DISCLAIMER
========================================================= */

.iem-ya__disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 26px 24px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #f7f9fb;
  color: #7a8795;
  font-size: 9.5px;
  line-height: 1.5;
}

.iem-ya__disclaimerIcon {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(13,77,120,.08);
  color: var(--ada-blue);
  font-size: 10px;
  font-weight: 850;
}

/* =========================================================
   ANIMATION
========================================================= */

@keyframes iemYaAdaPulse {
  0%, 100% { transform: scale(.94); opacity: .65; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {
  .iem-ya__shell {
    border-radius: 24px;
  }

  .iem-ya__adaHeader {
    min-height: 96px;
    padding: 18px;
  }

  .iem-ya__adaAvatar {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }

  .iem-ya__title {
    font-size: 24px;
  }

  .iem-ya__intro {
    padding: 18px 16px 0;
  }

  .iem-ya__app,
  .iem-ya__result {
    padding: 16px;
  }

  .iem-ya__bubble {
    max-width: 100%;
    padding: 15px 16px;
  }

  .iem-ya__stepTitle {
    font-size: 19px;
  }

  .iem-ya__stepCard {
    padding: 15px;
    border-radius: 18px;
  }

  .iem-ya__budgetGrid {
    grid-template-columns: 1fr;
  }

  .iem-ya__radios {
    grid-template-columns: 1fr;
  }

  .iem-ya__actions {
    align-items: stretch;
  }

  .iem-ya__btn {
    flex: 1 1 auto;
  }

  .iem-ya__resultIntro {
    padding: 16px 15px 16px 70px;
  }

  .iem-ya__resultAda {
    left: 14px;
    top: 15px;
    width: 43px;
    height: 43px;
  }

  .iem-ya__resultIntro h4 {
    font-size: 19px;
  }

  .iem-ya__resultTop {
    flex-direction: column;
  }

  .iem-ya__resultThumb {
    order: -1;
    width: 100%;
    height: 190px;
    flex: 0 0 auto;
  }

  .iem-ya__resultControls .iem-ya__btn {
    flex: 1 1 100%;
  }

  .iem-ya__disclaimer {
    margin: 0 16px 18px;
  }
}

@media (max-width: 380px) {
  .iem-ya__adaHeader {
    gap: 12px;
  }

  .iem-ya__adaAvatar {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .iem-ya__adaState {
    font-size: 10.5px;
  }

  .iem-ya__btn {
    min-height: 44px;
    padding: 0 13px;
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iem-ya__adaGlow,
  .iem-ya__radio,
  .iem-ya__btn,
  .iem-ya__resultItem,
  .iem-ya__progressDots span {
    animation: none !important;
    transition: none !important;
  }
}

.iem-ya__scoreNotice {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(13, 77, 120, 0.14);
  border-radius: 14px;
  background: rgba(13, 77, 120, 0.06);
  color: var(--ada-blue-dark);
  font-size: 13px;
  line-height: 1.55;
}

/* Arabic / RTL */
.iem-ya--ar { direction: rtl; text-align: right; }
.iem-ya--ar .iem-ya__adaHeader,
.iem-ya--ar .iem-ya__resultTop,
.iem-ya--ar .iem-ya__resultMeta,
.iem-ya--ar .iem-ya__actions,
.iem-ya--ar .iem-ya__radio,
.iem-ya--ar .iem-ya__field { direction: rtl; }
.iem-ya--ar .iem-ya__inputWrap input { text-align: right; }
.iem-ya--ar .iem-ya__resultActions { justify-content: flex-start; }
