/* ── Live Currency Converter – Styles ───────────────────────────────────── */

.cc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 800px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 28px rgba(0,0,0,0.08);
  color: #1e293b;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.cc__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cc__icon {
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.cc__title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: #0f172a;
}

.cc__desc {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ── Warning box ─────────────────────────────────────────────────────────── */

.cc__warn-box {
  background: #fef9c3;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  color: #78350f;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.cc__warn-box a { color: #92400e; font-weight: 700; }

/* ── Converter box ───────────────────────────────────────────────────────── */

.cc__converter {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.cc__amount-row {
  margin-bottom: 1.1rem;
}

.cc__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc__amount-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cc__amount-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

/* Pair row */
.cc__pair-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.1rem;
}

@media (max-width: 520px) {
  .cc__pair-row {
    grid-template-columns: 1fr;
  }
  .cc__swap-btn {
    justify-self: center;
    transform: rotate(90deg);
  }
}

.cc__select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.cc__select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.cc__swap-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  align-self: flex-end;
  flex-shrink: 0;
}

.cc__swap-btn:hover {
  background: #f5f3ff;
  border-color: #7c3aed;
  transform: rotate(180deg);
}

/* Convert button */
.cc__btn {
  width: 100%;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 10px;
  background: #7c3aed;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cc__btn:hover  { background: #6d28d9; }
.cc__btn:active { transform: scale(0.98); }

/* ── Loading ─────────────────────────────────────────────────────────────── */

.cc__loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  color: #64748b;
  font-size: 0.9rem;
}

.cc__spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e2e8f0;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: cc-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes cc-spin { to { transform: rotate(360deg); } }

/* ── Error ───────────────────────────────────────────────────────────────── */

.cc__error {
  padding: 0.85rem 1rem;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ── Result ──────────────────────────────────────────────────────────────── */

.cc__result-wrap {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 2px solid #c4b5fd;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.cc__result-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.cc__result-from {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4c1d95;
}

.cc__result-equals {
  font-size: 1.5rem;
  color: #7c3aed;
  font-weight: 800;
}

.cc__result-to {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}

.cc__result-rate {
  font-size: 0.84rem;
  color: #6d28d9;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.cc__result-updated {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ── Multi-currency grid ─────────────────────────────────────────────────── */

.cc__multi-wrap {
  margin-bottom: 1.5rem;
}

.cc__multi-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

.cc__multi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

@media (max-width: 580px) { .cc__multi-grid { grid-template-columns: repeat(2, 1fr); } }

.cc__multi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cc__multi-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.cc__multi-code {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc__multi-value {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.cc__multi-name {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* ── Popular pairs ───────────────────────────────────────────────────────── */

.cc__pairs-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
}

.cc__pairs-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 0.8rem;
}

.cc__pairs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cc__pair-tag {
  padding: 0.38rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.cc__pair-tag:hover {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #7c3aed;
}

/* ── Facts ───────────────────────────────────────────────────────────────── */

.cc__facts {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
}

.cc__facts-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 0.85rem;
}

.cc__facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 520px) { .cc__facts-grid { grid-template-columns: 1fr; } }

.cc__fact {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.81rem;
  color: #475569;
  line-height: 1.5;
}

.cc__fact strong {
  font-size: 0.84rem;
  color: #0f172a;
}
