.rd-usd-rates-widget {
  --rd-primary: #0f766e;
  --rd-accent: #f59e0b;
  --rd-surface: #ffffff;
  --rd-text: #0f172a;
  --rd-muted: #64748b;
  font-family: Arial, sans-serif;
  background: var(--rd-surface);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.rd-usd-rates-widget * {
  box-sizing: border-box;
}

.rd-usd-rates-widget__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rd-usd-rates-widget__titles {
  min-width: 0;
}

.rd-usd-rates-widget__header h3 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.15;
  color: var(--rd-text);
}

.rd-usd-rates-widget__header p {
  margin: 0;
  color: var(--rd-muted);
  font-size: 14px;
}

.rd-usd-rates-widget__refresh {
  border: 0;
  border-radius: 999px;
  background: var(--rd-primary);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.rd-usd-rates-widget__refresh:hover {
  transform: translateY(-1px);
}

.rd-usd-rates-widget__refresh:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.rd-usd-rates-widget__status {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--rd-primary);
  font-size: 14px;
}

.rd-usd-rates-widget__status.is-visible {
  display: block;
}

.rd-usd-rates-widget__status.is-error {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.rd-usd-rates-widget__view {
  display: none;
}

.rd-usd-rates-widget.is-full .rd-usd-rates-widget__view--full,
.rd-usd-rates-widget.is-compact .rd-usd-rates-widget__view--compact {
  display: block;
}

.rd-usd-rates-widget__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rd-usd-rates-widget__table thead th {
  text-align: left;
  padding: 12px 10px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.08));
  color: var(--rd-text);
  font-size: 14px;
}

.rd-usd-rates-widget__table thead th:nth-child(2),
.rd-usd-rates-widget__table thead th:nth-child(3),
.rd-usd-rates-widget__table tbody td:nth-child(2),
.rd-usd-rates-widget__table tbody td:nth-child(3) {
  text-align: right;
}

.rd-usd-rates-widget__table tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 15px;
  vertical-align: top;
  word-break: break-word;
}

.rd-usd-rates-widget__table tbody tr:last-child td {
  border-bottom: 0;
}

.rd-usd-rates-widget__source {
  margin-top: 4px;
  font-size: 12px;
}

.rd-usd-rates-widget__source a {
  color: var(--rd-primary);
  text-decoration: none;
}

.rd-usd-rates-widget__source a:hover {
  text-decoration: underline;
}

.rd-usd-rates-widget__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rd-usd-rates-widget__card {
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.03), rgba(245, 158, 11, 0.03));
}

.rd-usd-rates-widget__card-head {
  margin-bottom: 8px;
  color: var(--rd-text);
  font-size: 15px;
}

.rd-usd-rates-widget__mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: #334155;
}

.rd-usd-rates-widget__mini-row span {
  color: var(--rd-muted);
}

.rd-usd-rates-widget__mini-row b {
  color: var(--rd-text);
  text-align: right;
}

.rd-usd-rates-widget__source--compact {
  margin-top: 6px;
}

.rd-usd-rates-widget__empty {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
}

.rd-usd-rates-widget__footer {
  margin-top: 14px;
  color: var(--rd-muted);
  font-size: 12px;
}

.widget .rd-usd-rates-widget,
.sidebar .rd-usd-rates-widget,
.elementor-widget-container .rd-usd-rates-widget {
  padding: 12px;
  border-radius: 16px;
}

.widget .rd-usd-rates-widget__header h3,
.sidebar .rd-usd-rates-widget__header h3,
.elementor-widget-container .rd-usd-rates-widget__header h3 {
  font-size: 18px;
}

.widget .rd-usd-rates-widget__header p,
.sidebar .rd-usd-rates-widget__header p,
.elementor-widget-container .rd-usd-rates-widget__header p {
  font-size: 12px;
}

@media (max-width: 640px) {
  .rd-usd-rates-widget {
    padding: 14px;
    border-radius: 16px;
  }

  .rd-usd-rates-widget__header {
    flex-direction: column;
    align-items: stretch;
  }

  .rd-usd-rates-widget__header h3 {
    font-size: 20px;
  }

  .rd-usd-rates-widget__refresh {
    width: 100%;
  }
}
