/* Ex Center Home Plugin Styles */
.ex-center-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

/* Header Styles */
.ex-header {
  background: linear-gradient(135deg, #00bf63, #00a855);
  color: white;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  text-align: center;
}

.ex-title {
  font-size: 2.5rem;
  margin: 0 0 20px 0;
  font-weight: bold;
}

.ex-currency-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.ex-select {
  border: none;
  border-radius: 25px;
  font-size: 16px;
  background: white;
  color: #333;
  min-width: 200px;
}

.ex-btn-primary {
  background: #ffffff;
  color: #00bf63;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ex-btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.ex-search {
  max-width: 400px;
  margin: 0 auto;
}
.ex-search-input {
  width: 100%  !important;
  padding: 12px 20px  !important;
  border: none  !important;
  border-radius: 25px  !important;
  font-size: 16px  !important;
  background: rgba(255, 255, 255, 0.9) !important;
}


/* Currency Converter Styles */
.ex-converter-section {
  background: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ex-converter-header {
  text-align: center;
  margin-bottom: 25px;
}

.ex-converter-header h3 {
  color: #00bf63;
  font-size: 1.5rem;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ex-converter-header p {
  color: #666;
  margin: 0;
  font-size: 14px;
}

.ex-converter-container {
  max-width: 800px;
  margin: 0 auto;
}

.ex-converter-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr auto;
  gap: 15px;
  align-items: end;
  margin-bottom: 20px;
}

.ex-converter-input,
.ex-converter-select {
  display: flex;
  flex-direction: column;
}

.ex-converter-input label,
.ex-converter-select label {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
  font-size: 14px;
}

.ex-amount-input,
.ex-currency-select {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.ex-amount-input:focus,
.ex-currency-select:focus {
  outline: none;
  border-color: #00bf63;
  box-shadow: 0 0 0 3px rgba(0, 191, 99, 0.1);
}

/* Disabled currency select styling */
.ex-currency-select:disabled {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
  opacity: 0.8;
}

.ex-currency-select:disabled:hover {
  border-color: #e0e0e0;
}

/* Hide swap button when to-currency is disabled */
.ex-converter-row .ex-swap-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

.ex-converter-row .ex-swap-btn:hover {
  transform: none;
  background: #00bf63;
}

.ex-swap-btn {
  background: #00bf63;
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ex-swap-btn:hover {
  background: #00a855;
  transform: rotate(180deg);
}

.ex-convert-btn {
  background: linear-gradient(135deg, #00bf63, #00a855);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ex-convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 191, 99, 0.3);
}

.ex-converter-result {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.ex-result-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ex-result-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00bf63;
  text-align: center;
  margin-bottom: 10px;
}

.ex-result-info {
  color: #666;
  font-size: 14px;
  text-align: center;
}

.ex-result-info i {
  color: #00bf63;
  margin-right: 5px;
}

/* Currency List Section with Tabs */
.ex-currency-list-section {
  background: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ex-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.ex-section-header h3 {
  color: #00bf63;
  font-size: 1.8rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ex-currency-search {
  position: relative;
  max-width: 300px;
}

.ex-currency-search-input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.ex-currency-search-input:focus {
  outline: none;
  border-color: #00bf63;
  box-shadow: 0 0 0 3px rgba(0, 191, 99, 0.1);
}

.ex-currency-search i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

/* Currency Tabs */
.ex-currency-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 25px;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 5px;
  overflow-x: auto;
}

.ex-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}

.ex-tab-btn.active {
  background: #00bf63;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 191, 99, 0.3);
}

.ex-tab-btn:hover:not(.active) {
  background: rgba(0, 191, 99, 0.1);
  color: #00bf63;
}

/* Currency Table Container */
.ex-currency-table-container {
  position: relative;
}

/* Load More Section */
.ex-load-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.ex-load-more-btn {
  background: linear-gradient(135deg, #00bf63, #00a855);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ex-load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 191, 99, 0.3);
}

.ex-load-more-btn:hidden {
  display: none;
}

.ex-currency-count {
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* Responsive converter */
@media (max-width: 768px) {
  .ex-converter-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .ex-swap-btn {
    justify-self: center;
    transform: rotate(90deg);
  }

  .ex-swap-btn:hover {
    transform: rotate(270deg);
  }

  .ex-result-amount {
    font-size: 1.2rem;
  }

  .ex-section-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .ex-currency-search {
    max-width: none;
  }

  .ex-currency-tabs {
    justify-content: center;
  }

  .ex-tab-btn {
    padding: 10px 15px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .ex-converter-section {
    padding: 20px 15px;
    margin-left: -25px;
    margin-right: -25px;
  }

  .ex-converter-header h3 {
    font-size: 1.3rem;
  }

  .ex-amount-input,
  .ex-currency-select {
    font-size: 14px;
  }

  .ex-convert-btn {
    padding: 10px 15px;
    font-size: 14px;
  }

  .ex-currency-list-section {
    padding: 20px 15px;
     margin-left: -25px;
    margin-right: -25px;
  }

  .ex-section-header h3 {
    font-size: 1.4rem;
  }

  .ex-currency-tabs {
    flex-wrap: wrap;
    gap: 3px;
  }

  .ex-tab-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Stats Cards */
.ex-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.ex-stat-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s ease;
}

.ex-stat-card:hover {
  transform: translateY(-5px);
}

.ex-stat-icon {
  font-size: 2.5rem;
  color: #00bf63;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 191, 99, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.ex-stat-icon i {
  font-size: 2.5rem;
  line-height: 1;
}

.ex-stat-content {
  flex: 1;
}

.ex-stat-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.ex-stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #00bf63;
  margin-bottom: 5px;
}

.ex-stat-center {
  font-size: 14px;
  color: #888;
}

/* View Toggle */
.ex-view-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  background: white;
  border-radius: 25px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ex-toggle-btn {
  padding: 12px 30px;
  border: none;
  background: transparent;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
}

.ex-toggle-btn.active {
  background: #00bf63;
  color: white;
}

/* Views */
.ex-view {
  display: none;
}

.ex-view.active {
  display: block;
}

/* Table Styles */
.ex-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

.ex-table-header h3 {
  color: #00bf63;
  font-size: 1.5rem;
  margin: 0;
}

.ex-update-time {
  color: #666;
  font-size: 14px;
}

.ex-table-container {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.ex-table {
  width: 100%;
  border-collapse: collapse;
}

.ex-table th {
  background: linear-gradient(135deg, #00bf63, #00a855);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: bold;
}

.ex-table td {
  padding: 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.ex-table tbody tr:hover {
  background: #f8f9fa;
}

/* Exchange Center Logos */
.ex-center-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 5px;
}

.ex-center-info {
  display: flex;
  align-items: center;
}

.ex-center-name {
  font-weight: bold;
  color: #333;
}

.ex-center-name-bn {
  font-size: 12px;
  color: #666;
  display: block;
}

/* Rate Display */
.ex-rate {
  font-size: 1.2rem;
  font-weight: bold;
  color: #00bf63;
}

.ex-rate-currency {
  font-size: 12px;
  color: #666;
  display: block;
}

/* Difference Display */
.ex-difference {
  font-weight: bold;
}

.ex-difference.positive {
  color: #28a745;
}

.ex-difference.negative {
  color: #dc3545;
}

/* Status Badges */
.ex-status-badge {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.ex-status-best {
  background: #00bf63;
  color: white;
}

.ex-status-good {
  background: #28a745;
  color: white;
}

.ex-status-average {
  background: #ffc107;
  color: #333;
}

/* Details Button */
.ex-details-btn {
  background: #00bf63;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ex-details-btn:hover {
  background: #00a855;
  transform: translateY(-1px);
}

/* Currency Row */
.ex-currency-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ex-currency-flag {
  width: 30px;
  height: 20px;
  border-radius: 3px;
}

.ex-currency-code {
  font-weight: bold;
  color: #333;
  min-width: 40px;
}

.ex-currency-name {
  color: #666;
  font-size: 14px;
}

/* Loading Spinner */
.ex-loading {
  text-align: center;
  padding: 50px;
  display: none;
}

.ex-loading.active {
  display: block;
}

.ex-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #00bf63;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .ex-center-container {
    padding: 15px;
  }

  .ex-currency-list-section{
     margin-left: -25px;
    margin-right: -25px;
  }

  .ex-title {
    font-size: 2rem;
  }

  .ex-currency-selector {
    flex-direction: column;
    gap: 10px;
  }

  .ex-select {
    min-width: auto;
    width: 100%;
  }

  .ex-stats-grid {
    grid-template-columns: 1fr;
  }

  .ex-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ex-table {
    font-size: 14px;
  }

  .ex-table th,
  .ex-table td {
    padding: 10px 8px;
  }

  .ex-view-toggle {
    flex-direction: column;
  }

  .ex-toggle-btn {
    width: 100%;
  }
  .ex-converter-section {
    margin-left: -25px;
    margin-right: -25px;
  }
}

/* Bengali Font Support */
@font-face {
  font-family: "SolaimanLipi";
  src: url("https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;700&display=swap");
}

/* Print Styles */
@media print {
  .ex-header,
  .ex-view-toggle,
  .ex-details-btn,
  .ex-load-more-container {
    display: none !important;
  }

  .ex-table-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Error Message Styles */
.ex-error-message {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 10px;
  margin: 20px 0;
}

.ex-error-icon {
  font-size: 3rem;
  color: #856404;
}

.ex-error-text h4 {
  color: #856404;
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

.ex-error-text p {
  color: #856404;
  margin: 0 0 15px 0;
}

.ex-retry-btn {
  background: #00bf63;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.ex-retry-btn:hover {
  background: #00a855;
  transform: translateY(-1px);
}

/* Loading improvements */
.ex-loading {
  text-align: center;
  padding: 50px;
  display: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  margin: 20px 0;
}

.ex-loading.active {
  display: block;
}

.ex-loading p {
  color: #00bf63;
  font-weight: bold;
  margin-top: 15px;
}

/* Image error handling */
.ex-center-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 5px;
  background: #f8f9fa;
  border: 1px solid #eee;
}

/* Connection status indicator */
.ex-connection-status {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 1000;
  transition: all 0.3s ease;
}

.ex-connection-status.online {
  background: #28a745;
  color: white;
}

.ex-connection-status.offline {
  background: #dc3545;
  color: white;
}

.ex-connection-status.loading {
  background: #ffc107;
  color: #333;
}

/* Responsive error messages */
@media (max-width: 768px) {
  .ex-error-message {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .ex-error-icon {
    font-size: 2rem;
  }
}

/* Loading message styles */
.ex-loading-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: #666;
}

.ex-spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #00bf63;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Debug section improvements */
.ex-debug-section {
  margin-top: 20px;
  padding: 15px;
  background: #f0f0f0;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.ex-debug-section h4 {
  margin: 0 0 10px 0;
  color: #333;
}

#debug-output {
  margin-top: 10px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Better error message styling */
.ex-error-message {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 10px;
  margin: 10px 0;
}

.ex-error-icon {
  font-size: 2rem;
  color: #856404;
  flex-shrink: 0;
}

.ex-error-text {
  flex: 1;
}

.ex-error-text h4 {
  color: #856404;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
}

.ex-error-text p {
  color: #856404;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

.ex-retry-btn {
  background: #00bf63;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.ex-retry-btn:hover {
  background: #00a855;
  transform: translateY(-1px);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .ex-error-message {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .ex-error-icon {
    font-size: 1.5rem;
  }

  #debug-output {
    font-size: 10px;
    max-height: 200px;
  }
}

/* Center Logo in Currency Tables */
.ex-center-logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ex-center-logo-small {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  background: #f8f9fa;
  border: 1px solid #eee;
  flex-shrink: 0;
}

.ex-center-name-small {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Ensure Font Awesome icons display properly */
.fas,
.far,
.fab {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
  font-weight: 900;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

/* Specific icon fixes */
.fa-chart-line-down:before {
  content: "\f3be"; /* Use chart-line icon if chart-line-down doesn't exist */
}

.fa-chart-bar:before {
  content: "\f080";
}

.fa-chart-line:before {
  content: "\f201";
}

/* Responsive adjustments for currency tables */
@media (max-width: 768px) {
  .ex-center-logo-container {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .ex-center-logo-small {
    width: 28px;
    height: 28px;
  }

  .ex-center-name-small {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .ex-center-logo-container {
    gap: 3px;
  }

  .ex-center-logo-small {
    width: 24px;
    height: 24px;
  }

  .ex-center-name-small {
    font-size: 10px;
  }

  .ex-stat-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .ex-stat-icon i {
    font-size: 2rem;
  }
}

/* Loading state for currency sections */
.ex-section-loading {
  position: relative;
}

.ex-section-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1;
  pointer-events: none;
}

/* Hide skeleton rows when data is loaded */
.ex-currency-table-container:not(.ex-section-loading) .ex-skeleton-row {
  display: none !important;
}

/* Ensure real data rows are visible when loaded */
.ex-currency-table-container:not(.ex-section-loading) tbody tr:not(.ex-skeleton-row) {
  display: table-row;
}

/* Loading animation for currency sections */
.ex-section-loading {
  position: relative;
}

.ex-section-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1;
  pointer-events: none;
}

/* Currency error styling */
.ex-currency-section .ex-error-message {
  margin: 20px;
  padding: 20px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.ex-currency-section .ex-error-icon {
  font-size: 2rem;
  color: #856404;
  flex-shrink: 0;
}

.ex-currency-section .ex-error-text {
  flex: 1;
}

.ex-currency-section .ex-error-text h4 {
  color: #856404;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
}

.ex-currency-section .ex-error-text p {
  color: #856404;
  margin: 0 0 15px 0;
  line-height: 1.4;
}
.ex-title{
  color: white;
}