/* ===== CONVERTER WIDGET ===== */
.conv-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f97316;
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.conv-trigger:hover { background: #d95f02; transform: translateY(-1px); }
.conv-trigger svg { width: 16px; height: 16px; }

.conv-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1200;
  backdrop-filter: blur(4px);
}
.conv-backdrop.open { display: block; }

/* ── PANEL ── */
.conv-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.95);
  z-index: 1300;
  width: min(480px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(.4,1.3,.6,1);
  direction: rtl;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.conv-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* ── HEADER ── */
.conv-head {
  background: linear-gradient(135deg, #003d7a 0%, #0a5eb0 100%);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.conv-head-title {
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1;
  letter-spacing: 0.01em;
}
.conv-head-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.2s;
  flex-shrink: 0;
}
.conv-head-close:hover { background: rgba(255,255,255,0.32); }

/* ── TABS ── */
.conv-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}
.conv-tab {
  flex: 1;
  padding: 0.8rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.conv-tab.active {
  background: #fff;
  color: #003d7a;
  border-bottom-color: #f97316;
}
.conv-tab:not(.active):hover { background: #f1f5f9; color: #334155; }

/* ── BODY ── */
.conv-body { padding: 1.25rem; }

/* ── MARKET BTNS ── */
.conv-market-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.conv-market-btn {
  padding: 5px 14px;
  border-radius: 99px;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.conv-market-btn.active {
  background: #003d7a;
  color: #fff;
  border-color: #003d7a;
}
.conv-market-btn:not(.active):hover { border-color: #003d7a; color: #003d7a; }

/* ── CURRENCY BOX ── */
.conv-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  transition: border-color 0.2s, background 0.2s;
}
.conv-box:focus-within {
  border-color: #003d7a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,61,122,0.08);
}
.conv-box-label {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.conv-box-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── CURRENCY SELECT ── */
.conv-currency-select {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  min-width: 110px;
  position: relative;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 10px;
  transition: border-color 0.2s;
}
.conv-currency-select:hover { border-color: #003d7a; }
.conv-currency-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
}
.conv-currency-flag { font-size: 1.4rem; line-height: 1; }
.conv-currency-code { font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.conv-currency-name { font-size: 0.68rem; color: #94a3b8; }
.conv-currency-arrow { color: #94a3b8; font-size: 0.65rem; margin-right: 2px; flex-shrink: 0; }

/* ── AMOUNT ── */
.conv-amount-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.7rem;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  font-family: inherit;
  outline: none;
  min-width: 0;
  direction: ltr;
}
.conv-amount-result {
  flex: 1;
  font-size: 1.7rem;
  font-weight: 700;
  color: #003d7a;
  text-align: left;
  direction: ltr;
  min-width: 0;
  word-break: break-all;
}

/* ── SWAP ── */
.conv-swap-row {
  display: flex;
  justify-content: center;
  margin: 0.6rem 0;
}
.conv-swap-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: all 0.28s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.conv-swap-btn:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
  transform: rotate(180deg);
}

/* ── RATE BADGE ── */
.conv-rate-badge {
  margin-top: 0.85rem;
  padding: 0.65rem 1rem;
  background: #e8f1fb;
  border-radius: 10px;
  border: 1.5px solid #b5d4f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #185fa5;
  font-weight: 600;
  min-height: 42px;
  gap: 0.5rem;
}
.conv-rate-badge.error {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}
.conv-rate-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ── QUICK AMOUNTS ── */
.conv-quick {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  align-items: center;
}
.conv-quick span {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}
.conv-quick-btn {
  padding: 4px 12px;
  border-radius: 99px;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.conv-quick-btn:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
}

/* ── SPINNER ── */
.conv-spinner {
  width: 15px; height: 15px;
  border: 2px solid #e2e8f0;
  border-top-color: #003d7a;
  border-radius: 50%;
  animation: conv-spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes conv-spin { to { transform: rotate(360deg); } }

/* ── UPDATE TIME ── */
.conv-update {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.65rem;
}

/* ── FOOTER / PAIRS ── */
.conv-footer {
  border-top: 1.5px solid #e2e8f0;
  padding: 0.85rem 1.25rem 1.1rem;
  background: #f8fafc;
}
.conv-pairs-title {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.conv-pairs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.conv-pair-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.55rem 0.3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.conv-pair-card:hover {
  border-color: #f97316;
  background: #fff7ed;
  transform: translateY(-2px);
}
.conv-pair-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
}
.conv-pair-rate {
  font-size: 0.67rem;
  color: #64748b;
  margin-top: 2px;
  font-weight: 600;
}

/* ══════════════════════════════════════
   MOBILE — tam ekran
══════════════════════════════════════ */
@media (max-width: 600px) {
  .conv-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(30px) scale(1);
  }
  .conv-panel.open {
    transform: translateY(0) scale(1);
  }
  .conv-pairs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .conv-amount-input,
  .conv-amount-result {
    font-size: 1.5rem;
  }
  .conv-currency-select {
    min-width: 95px;
  }
}
/* ---- Add these styles near other mobile header rules (or at end of file) ---- */
@media (max-width: 600px) {
  /* header içindeki elemanların üstte sabit kalmasını sağlayıp trigger için yer hazırlıyoruz */
  .header-inner {
    position: relative; /* trigger absolute yerleşimi için */
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  /* Hamburger solda (RTL sitenize göre ayarladım) */
  .menu-btn {
    left: 1rem;
    right: auto;
    top: 10px;
  }

  /* Yan menüye eklenecek link için uygun görünüm */
  .side-menu a#openConverterSide {
    display: block;
    color: white;
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    margin: 0.25rem 1rem;
    text-decoration: none;
    transition: background .18s, transform .18s;
  }
  .side-menu a#openConverterSide:hover {
    background: #ff8c00;
    transform: translateX(-4px);
  }
}

/* Masaüstü / tablet okunaklılığı: panel biraz daha geniş, içerik daha belirgin */
@media (min-width: 601px) and (max-width: 1200px) {
  .conv-panel {
    width: min(680px, 92vw); /* tablet için daha geniş */
    max-height: 90vh;
  }
  .conv-amount-input, .conv-amount-result {
    font-size: 1.9rem;
  }
}
@media (min-width: 1201px) {
  .conv-panel {
    width: min(720px, 80vw);
  }
  .conv-amount-input, .conv-amount-result {
    font-size: 2rem;
  }
}
