/**
 * @file
 * Styles for exchange rates simple page.
 */

.exchange-rates-simple {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.page-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.page-header h1 {
  color: #333;
  font-size: 2.5em;
  margin: 0;
}

/* Location accordion styles */
.location-group {
  margin-bottom: 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fafafa;
  overflow: hidden;
  transition: all 0.3s ease;
}

.location-group.location-open {
  margin-bottom: 40px;
}

.location-title {
  color: #2c3e50;
  font-size: 1.2em;
  margin: 0;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.location-title:hover {
  background-color: #e9ecef;
}

.location-title:focus {
  outline-offset: -2px;
}

.location-name {
  flex: 1;
}

.location-arrow {
  font-size: 0;
  transition: transform 0.3s ease;
  margin-right: 10px;
  border-left: 3px solid rgb(126 128 135);
  border-bottom: 3px solid rgb(126 128 135);
  display: inline-block;

  width: 12px;
  height: 12px;
}

.location-group.location-open .location-arrow {
  transform: rotate(-45deg);
}

.location-group.location-closed .location-arrow {
  transform: rotate(135deg);
}

.location-content {
  padding: 20px;
  transition: all 0.3s ease;
}

.location-group.location-closed .location-content {
  display: none;
}

.provider-block {
  margin-bottom: 30px;
  background: #fff;
  padding: 10px 20px 20px;
  border-radius: 16px;
  box-shadow: 0px 0px 5px #ddd;

}

.provider-block:last-child {
  margin-bottom: 0;
}

.provider-name {
  color: #27ae60;
  font-size: 1.4em;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #27ae60;
}

.rates-table-wrapper {
  overflow-x: auto;
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border: 1px solid #e5e5e5;
  background-color: #fff;
}

.rates-table th,
.rates-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.rates-table th:first-child {
  border-radius: 5px 0 0 0;
  overflow: hidden;
}
.rates-table th:last-child {
  border-radius: 0 5px 0 0;
  overflow: hidden;
}
.rates-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  padding: 16px 15px;
}

.rates-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.rates-table tr:hover {
  background-color: #e9ecef;
}

.currency-col {
  width: 30%;
  font-weight: 600;
}

.buy-col,
.sell-col {
  width: 35%;
  text-align: right;
}

.currency-cell {
  font-weight: 600;
  color: #2c3e50;
}

.currency-code {
  font-size: 1.1em;
  font-weight: 700;
}

.buy-cell,
.sell-cell {
  text-align: right;
  font-weight: 500;
  color: #495057;
}

.buy-cell {
  color: #28a745;
}

.sell-cell {
  color: #dc3545;
}

.no-rates,
.no-provider-rates {
  text-align: center;
  padding: 30px;
  color: #6c757d;
  font-style: italic;
  border: 1px dashed #ccc;
  border-radius: 6px;
  background-color: #f8f9fa;
}

/* Animation for accordion */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 1000px;
  }
  to {
    opacity: 0;
    max-height: 0;
  }
}

.location-content.opening {
  animation: slideDown 0.3s ease-out;
}

.location-content.closing {
  animation: slideUp 0.3s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
  .exchange-rates-simple {
    padding: 10px;
  }

  .location-content {
    padding: 15px;
  }

  .provider-block {
    padding: 15px;
  }

  .rates-table th,
  .rates-table td {
    padding: 8px 10px;
    font-size: 0.9em;
  }

  .page-header h1 {
    font-size: 2em;
  }

  .location-title {
    font-size: 1.5em;
    padding: 15px;
  }

  .provider-name {
    font-size: 1.2em;
  }
}