/* Exchange Rates Widget Styles */
.exchange-rates-widget {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 12px;
  padding: 30px;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

/* Header Styles */
.exchange-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.exchange-header-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exchange-header-icon i {
  font-size: 32px;
  color: white;
}

.exchange-header-content {
  /*flex: 1;*/
}

.exchange-main-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: white;
  line-height: 1.2;
}

.exchange-subtitle {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* Table Styles */
.exchange-table {
  margin-bottom: 25px;
}

.exchange-table-headers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
}

.exchange-table-header {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exchange-rates-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exchange-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.exchange-rate-row:last-child {
  border-bottom: none;
}

.exchange-rate-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding-left: 10px;
  padding-right: 10px;
}

.currency-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* Updated Flag Styles for Two Flags */
.currency-flags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.currency-flag-primary,
.currency-flag-secondary {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.currency-flag-primary img,
.currency-flag-secondary img {
  object-fit: cover;
  border-radius: 4px;
}

/* Primary flag default styling */
.currency-flag-primary img {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Secondary flag default styling - slightly smaller */
.currency-flag-secondary img {
  width: 23px;
  height: 23px;
  border: 1px solid #B8B8B8;
  opacity: 0.9;
}

/* Optional: Overlapping effect */
.currency-flags.overlapping {
  gap: -8px;
}

.currency-flags.overlapping .currency-flag-secondary {
  z-index: 1;
}

.currency-flags.overlapping .currency-flag-primary {
  z-index: 2;
}

.currency-name {
  font-size: 16px;
  font-weight: 500;
  color: white;
  line-height: 1.2;
}

.exchange-rate-value {
  font-size: 18px;
  font-weight: 600;
  color: white;
  text-align: right;
  min-width: 100px;
}

/* Footer Styles */
.exchange-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.exchange-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #1e40af;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.exchange-button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: #1e40af;
}

.exchange-button i {
  font-size: 12px;
}

.exchange-date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .exchange-rates-widget {
    padding: 20px;
    margin: 0 10px;
  }

  .exchange-header {
    text-align: center;
    gap: 10px;
    margin-bottom: 25px;
  }

  .exchange-header-icon {
    width: 50px;
    height: 50px;
  }

  .exchange-header-icon i {
    font-size: 24px;
  }

  .exchange-main-title {
    font-size: 24px;
  }

  .exchange-subtitle {
    font-size: 14px;
  }

  .exchange-table-headers {
    padding: 0 10px 10px 10px;
  }

  .exchange-rate-row {
    padding: 12px 10px;
  }

  .currency-name {
    font-size: 14px;
  }

  .exchange-rate-value {
    font-size: 16px;
    min-width: 80px;
  }

  /* Responsive flag sizes */
  .currency-flag-primary img {
    width: 28px;
    height: 28px;
  }

  .currency-flag-secondary img {
    width: 24px;
    height: 24px;
  }

  .exchange-footer {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .exchange-button {
    padding: 10px 16px;
    font-size: 13px;
  }

  .exchange-date {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .exchange-rates-widget {
    padding: 15px;
  }

  .exchange-main-title {
    font-size: 20px;
  }

  .exchange-subtitle {
    font-size: 13px;
  }

  .exchange-table-header {
    font-size: 12px;
  }

  .currency-name {
    font-size: 13px;
  }

  .exchange-rate-value {
    font-size: 14px;
  }

  /* Smaller flag sizes on mobile */
  .currency-flag-primary img {
    width: 24px;
    height: 24px;
  }

  .currency-flag-secondary img {
    width: 20px;
    height: 20px;
  }

  .exchange-button {
    width: 100%;
    justify-content: center;
  }
}

/* Animation Effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exchange-rate-row {
  animation: fadeInUp 0.6s ease forwards;
}

.exchange-rate-row:nth-child(1) {
  animation-delay: 0.1s;
}
.exchange-rate-row:nth-child(2) {
  animation-delay: 0.2s;
}
.exchange-rate-row:nth-child(3) {
  animation-delay: 0.3s;
}
.exchange-rate-row:nth-child(4) {
  animation-delay: 0.4s;
}
.exchange-rate-row:nth-child(5) {
  animation-delay: 0.5s;
}

/* Additional Flag Styling Options */
.currency-flags.stacked {
  flex-direction: column;
  gap: 2px;
}

.currency-flags.side-by-side {
  flex-direction: row;
  gap: 5px;
}

/* Flag hover effects */
.currency-flag-primary:hover img,
.currency-flag-secondary:hover img {
  /*transform: scale(1.1);*/
  /*transition: transform 0.2s ease;*/
}
