/* Currency Selector Modal Styles */

/* Modal Container */
.currency-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.currency-modal.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Modal Content */
.currency-modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease-out;
}

/* Modal Header */
.currency-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 15px;
  border-bottom: 1px solid #e0e0e0;
}

.currency-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #090000;
}

.currency-close {
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.currency-close:hover {
  background-color: #f5f5f5;
  color: #666;
}

/* Modal Body */
.currency-modal-body {
  padding: 20px 25px 25px;
}

/* Currency Options */
.currency-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.currency-option {
  padding: 15px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  color: #333;
  background-color: #fff;
}

.currency-option:hover {
  background-color: #f8f9fa;
  border-color: #24a393;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(36, 163, 147, 0.1);
}

.currency-option.selected {
  background-color: #e8f5e8;
  border-color: #24a393;
  border-left: 4px solid #24a393;
  font-weight: 500;
}

.currency-option strong {
  color: #24a393;
  font-weight: 600;
}

/* Sidebar Currency Link */
.sidebar-currency-link {
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-currency-link:hover {
  background-color: rgba(36, 163, 147, 0.1);
}

.currency-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-currency-text {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.currency-badge {
  background-color: #24a393;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 35px;
  text-align: center;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 30px 20px;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #24a393;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

/* Error Message */
.error-message {
  color: #dc3545;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  padding: 10px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/* Success Message */
.currency-success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 15px 20px;
  border-radius: 6px;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .currency-modal-content {
    margin: 20% auto;
    width: 95%;
    max-width: 350px;
  }

  .currency-modal-header {
    padding: 15px 20px 10px;
  }

  .currency-modal-body {
    padding: 15px 20px 20px;
  }

  .currency-option {
    padding: 12px 15px;
    font-size: 15px;
  }

  .currency-success-message {
    top: 10px;
    right: 10px;
    left: 10px;
    text-align: center;
  }
}

/* Logo visibility fixes */
.ampstart-sidebar-nav-image {
  display: block !important;
  max-width: 120px;
  height: auto;
}

.ampstart-headerbar a[href="/"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: auto;
  width: auto;
}

/* Ensure logo is visible on all screen sizes */
@media (min-width: 768px) {
  .ampstart-sidebar-nav-image {
    max-width: 140px;
  }
}

/* Currency selector alignment fixes */
.currency-selector-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  gap: 4px !important;
  line-height: 1 !important;
}

.currency-selector-link span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.currency-selector-link svg {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 2px !important;
  line-height: 1 !important;
}

.currency-selector-link .nav-span {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* Specific alignment for currency icon and text */
.currency-selector-link span:first-child {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.currency-selector-link span:last-child {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Force vertical alignment */
.currency-selector-link {
  vertical-align: baseline !important;
}

.currency-selector-link * {
  vertical-align: baseline !important;
}

/* Ensure icon and text are at the same baseline */
.currency-selector-link svg,
.currency-selector-link .nav-span {
  vertical-align: baseline !important;
  line-height: 1 !important;
  font-size: inherit !important;
}
