html, body {
  height: auto;
  margin: 0;
  font-family: sans-serif;
  font-weight: bold;
  background: linear-gradient(135deg, #f2cf07, #f2af07);
  color: white;
}

/* Header section */
.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 0px;
  background: black;
}

.top-left-logo {
  position: inline;
  top: 0;
  left: 0;
  margin: 0;
  padding: 10px; /* Optional: to give it some spacing from the edges */
  z-index: 1000; /* Ensure it stays above other elements */
}

h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

/* Form Styling */
form {
  display: flex;
  flex-direction: column;
  align-items: left;
  margin: 40px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 700px;
  min-width: 500px;
}

table {
  margin: 2px 4px;
  max-width: 97%;
}

table th {
  vertical-align: middle;
  align-self: center;
  text-align: center !important;
}

table td {
  vertical-align: middle;
  align-self: center;
  text-align: center !important;
}

td.left {
  vertical-align: middle;
  align-self: left;
  text-align: left !important;
}

/* Ensure tables are responsive */
.table-responsive {
  overflow-x: auto;
}

/* Reduce font size and padding for small screens */
@media (max-width: 850px) {
  .table th, .table td {
    font-size: 12px; /* Reduce text size */
    padding: 4px; /* Reduce cell padding */
  }
}

/* Further reduce font size for very small screens */
.top-badge-flash-enabled .promo-badge {
  animation: top-badge-flash 0.9s ease-in-out infinite alternate;
}

@keyframes top-badge-flash {
  from {
    background-color: var(--top-badge-color, #d00000);
    transform: rotate(-15deg) scale(1);
  }
  to {
    background-color: var(--top-badge-flash-color, #ffcc00);
    transform: rotate(-15deg) scale(1.08);
  }
}


@media (max-width: 600px) {
  .table th, .table td {
    font-size: 10px;
    padding: 2px;
  }
}

/* Stack tables vertically on smaller screens */
@media (max-width: 850px) {
  .col-md-4 {
    width: 100%;
  }
}

.text-red {
  color: red !important;
}

.currency-rate-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
}

.promo-badge {
  display: inline-block;
  flex: 0 0 auto;
  padding: 0.38em 0.62em 0.3em;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  background-color: var(--top-badge-color, #d00000);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: #ffffff !important;
  font-size: var(--top-badge-size, 20px);
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-15deg);
}

@media (max-width: 600px) {
  .currency-rate-line {
    gap: 3px;
  }

  .promo-badge {
    font-size: var(--top-badge-size, 20px);
  }
}

/* Disabled buying/selling rate status */
.currency-value .text-not-trading,
.currency-value .text-not-available {
  display: inline-block;
  color: #e00000 !important;
  font-size: clamp(16px, 1.6vw, 23px) !important;
  font-weight: 900 !important;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 600px) {
  .currency-value .text-not-trading,
.currency-value .text-not-available { font-size: 16px !important; }
}
