/* ===== Rates Page Styles ===== */

.rates {
  padding: 60px 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #fff 100%);
}

.rates__container {
  padding-top: 40px;
  padding-bottom: 60px;
}

.rates__wrapper {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 2rem;
}

.rates__table {
  width: 100%;
  border-collapse: collapse;
}

.rates__table thead {
  background: linear-gradient(135deg, #2b59ff 0%, #0072ff 100%);
}

.rates__table thead th {
  color: #fff;
  padding: 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rates__row {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s ease;
}

.rates__row:hover {
  background-color: #f8f9fa;
}

.rates__cell {
  padding: 16px 20px;
  vertical-align: middle;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rates__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
}

.rates__rate {
  font-weight: 700;
  color: #2b59ff;
  font-size: 16px;
  font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
  .rates {
    padding: 40px 0;
  }

  .rates__table thead th,
  .rates__cell {
    padding: 12px;
    font-size: 12px;
  }

  .rates__icon {
    width: 24px;
    height: 24px;
  }

  .rates__rate {
    font-size: 14px;
  }
}

.currency img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  pointer-events: none;
  transition: transform 0.3s ease;
}
.currency img:hover {
  transform: scale(1.1);
}

.arrow {
  font-size: 1.9rem;
  color: #007aff;
  user-select: none;
  flex-shrink: 0;
  transition: color 0.3s ease;
  margin-right: 10px;
}
.rate-pair:hover .arrow {
  color: #005fcc;
}

/* Исправленный блок для курса */
.rate {
  font-size: 1.35rem;
  color: #007aff;
  font-weight: 700;
  width: max-content;
  text-align: right;
  user-select: text;
  font-variant-numeric: tabular-nums;
}

/* Responsive */
@media (max-width: 768px) {
  .rates-wrapper {
    max-width: 95vw;
    margin: 2rem auto 3rem;
  }
  .rate-pair {
    padding: 1.3rem 1.6rem;
    gap: 14px;
  }

  .currency img {
    width: 30px;
    height: 30px;
  }
  .arrow {
    font-size: 1.7rem;
  }
  .rate {
    font-size: 1.2rem;
    min-width: 80px;
    max-width: 100px;

    white-space: nowrap;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .rates-container {
    grid-template-columns: 1fr;
    gap: 1.2rem 0;
  }
  .rate-pair {
    font-size: 1rem;
    padding: 1rem 1.2rem;
    gap: 12px;
  }
  .currency {
    min-width: 120px;
  }
  .currency img {
    width: 28px;
    height: 28px;
  }
  .arrow {
    font-size: 1.5rem;
  }
  .rate {
    font-size: 1.1rem;
    min-width: 100px;
    max-width: 100%;

    white-space: nowrap;
    overflow-x: auto;
  }
}
