/* Price Feed Display Styles */

.price-display-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Gluten', 'Arial Black', sans-serif;
}

.price-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.price-value {
  font-size: 14px;
  color: #a8b8ed;
  font-weight: 700;
}

.price-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.price-change.up {
  color: #4CAF50;
}

.price-change.down {
  color: #f44336;
}

.price-change.neutral {
  color: rgba(255, 255, 255, 0.5);
}

.change-indicator {
  font-size: 10px;
}

/* Enhanced Swap Modal Styles - Matching Old Design */
.lofi-swap-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 300ms ease;
}

.lofi-swap-modal[style*="display: flex"] {
  opacity: 1;
}

.lofi-swap-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lofi-swap-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 50%, #3d4785 100%);
  border-radius: 16px;
  border: 1px solid rgba(168, 184, 237, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  padding: 24px;
  transform: scale(0.9);
  transition: transform 300ms ease;
}

.lofi-swap-modal[style*="display: flex"] .lofi-swap-container {
  transform: scale(1);
}

.lofi-swap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lofi-swap-title {
  font-family: 'Gluten', Impact, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.lofi-swap-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.lofi-swap-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.lofi-swap-price-banner {
  background: rgba(168, 184, 237, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(168, 184, 237, 0.2);
}

.lofi-price-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.lofi-price-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.lofi-price-value {
  font-size: 16px;
  color: #a8b8ed;
  font-weight: 700;
  font-family: 'Gluten', Impact, sans-serif;
}

.lofi-price-unit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.lofi-price-change {
  display: flex;
  align-items: center;
}

.change-indicator.negative {
  color: #ff6b6b;
}

.change-indicator.positive {
  color: #51cf66;
}

.lofi-swap-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lofi-swap-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.section-balance {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.lofi-swap-input-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lofi-token-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.token-symbol {
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
  font-family: 'Gluten', Impact, sans-serif;
}

.lofi-amount-input {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  text-align: right;
  outline: none;
  min-width: 80px;
  font-family: 'Gluten', Impact, sans-serif;
}

.lofi-amount-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.lofi-amount-output {
  font-size: 18px;
  color: #a8b8ed;
  font-weight: 600;
  text-align: right;
  font-family: 'Gluten', Impact, sans-serif;
}

.lofi-swap-arrow {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.swap-direction-btn {
  background: rgba(168, 184, 237, 0.2);
  border: 1px solid rgba(168, 184, 237, 0.3);
  border-radius: 8px;
  padding: 8px;
  color: #a8b8ed;
  cursor: pointer;
  transition: all 0.2s ease;
}

.swap-direction-btn:hover {
  background: rgba(168, 184, 237, 0.3);
  transform: rotate(180deg);
}

.lofi-slippage-section {
  margin: 20px 0;
}

.slippage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

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

.slippage-options {
  display: flex;
  gap: 8px;
  align-items: center;
}

.slippage-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slippage-btn.active,
.slippage-btn:hover {
  background: rgba(168, 184, 237, 0.3);
  border-color: #a8b8ed;
  color: #ffffff;
}

.lofi-swap-button {
  width: 100%;
  background: linear-gradient(135deg, #a8b8ed 0%, #788af4 100%);
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Gluten', Impact, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 20px;
}

.lofi-swap-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #b5c4f2 0%, #8a9bf6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 184, 237, 0.4);
}

.lofi-swap-button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lofi-error-container {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-message {
  color: #ff6b6b;
  font-size: 14px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .lofi-swap-container {
    max-width: 95vw;
    padding: 20px;
  }
  
  .lofi-swap-title {
    font-size: 16px;
  }
  
  .lofi-amount-input,
  .lofi-amount-output {
    font-size: 16px;
  }
}

.change-percent {
  font-size: 11px;
}

.price-loading {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  font-size: 12px;
  animation: pulse 2s infinite;
}

.price-error {
  color: #f44336;
  font-size: 12px;
  font-style: italic;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Compact format */
.price-display-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.price-display-compact .price-value {
  font-size: 13px;
  font-weight: 700;
  color: #a8b8ed;
}

.price-display-compact .price-direction {
  font-size: 10px;
  margin-left: 2px;
}

/* Banner styles for swap interfaces */
.lofi-swap-price-banner {
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(168, 184, 237, 0.15), rgba(168, 184, 237, 0.08));
  border-radius: 12px;
  border: 1px solid rgba(168, 184, 237, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  transition: all 0.3s ease;
}

.lofi-swap-price-banner:hover {
  background: linear-gradient(135deg, rgba(168, 184, 237, 0.2), rgba(168, 184, 237, 0.1));
  border-color: rgba(168, 184, 237, 0.4);
}

.lofi-price-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lofi-price-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.lofi-price-value {
  font-size: 16px;
  color: #a8b8ed;
  font-weight: 700;
}

.lofi-price-change {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .price-display-container {
    gap: 6px;
  }
  
  .price-value {
    font-size: 13px;
  }
  
  .price-label {
    font-size: 11px;
  }
  
  .lofi-swap-price-banner {
    padding: 12px;
    margin-bottom: 16px;
  }
  
  .lofi-price-value {
    font-size: 14px;
  }
  
  .lofi-price-label {
    font-size: 13px;
  }
}

/* ===============================================================================================
 * SIMPLE SWAP MODAL STYLES - DIRECT HTML IMPLEMENTATION
 * ===============================================================================================
 * 
 * Easy-to-find, easy-to-edit styles for the simple swap modal built directly into HTML
 * No complex systems, no unified anything - just straightforward styling you can control
 * 
 * ===============================================================================================
 */

.simple-swap-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 300ms ease;
}

.simple-swap-modal[style*="display: flex"] {
  opacity: 1;
}

.simple-swap-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.simple-swap-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 50%, #3d4785 100%);
  border-radius: 16px;
  border: 2px solid rgba(168, 184, 237, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 24px;
  transform: scale(0.9);
  transition: transform 300ms ease;
}

.simple-swap-modal[style*="display: flex"] .simple-swap-container {
  transform: scale(1);
}

.simple-swap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.simple-swap-header h2 {
  font-family: 'Gluten', Impact, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.simple-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.simple-price-banner {
  background: rgba(168, 184, 237, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(168, 184, 237, 0.3);
  text-align: center;
  font-family: 'Gluten', Impact, sans-serif;
  font-size: 16px;
  color: #ffffff;
  font-weight: 500;
}

.simple-price-banner #simple-lofi-rate {
  color: #a8b8ed;
  font-weight: 700;
  font-size: 18px;
}

.simple-swap-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.token-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-info img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.token-info span {
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
  font-family: 'Gluten', Impact, sans-serif;
}

#sui-amount {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  text-align: right;
  outline: none;
  min-width: 80px;
  font-family: 'Gluten', Impact, sans-serif;
}

#sui-amount::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

#lofi-amount {
  font-size: 18px;
  color: #a8b8ed;
  font-weight: 600;
  text-align: right;
  font-family: 'Gluten', Impact, sans-serif;
}

.simple-swap-button {
  width: 100%;
  background: linear-gradient(135deg, #a8b8ed 0%, #788af4 100%);
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Gluten', Impact, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 20px;
}

.simple-swap-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #b5c4f2 0%, #8a9bf6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 184, 237, 0.4);
}

.simple-swap-button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile responsiveness for simple modal */
@media (max-width: 768px) {
  .simple-swap-container {
    max-width: 95vw;
    padding: 20px;
  }
  
  .simple-swap-header h2 {
    font-size: 18px;
  }
  
  #sui-amount,
  #lofi-amount {
    font-size: 16px;
  }
  
  .simple-price-banner {
    font-size: 14px;
  }
  
  .simple-price-banner #simple-lofi-rate {
    font-size: 16px;
  }
}

/* Professional Corner Button Design */
.lofi-dashboard-corner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999; /* Increased to ensure button is clickable above other elements */
  max-width: calc(100vw - 48px);
}

.get-lofi-button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #a8b8ed;
  color: #1a1a2e;
  border: none;
  padding: 12px 20px;
  border-radius: 28px;
  font-family: 'Gluten', Impact, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(168, 184, 237, 0.3), 
              0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.1);
  transition: all 0.3s ease;
}

.swap-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  object-fit: contain;
  filter: brightness(0.2) contrast(1.2);
}

.get-lofi-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(0, 0, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.get-lofi-button:hover {
  background: #b5c4f2;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(168, 184, 237, 0.4), 
              0 4px 12px rgba(0, 0, 0, 0.15);
}

.get-lofi-button:hover::before {
  opacity: 1;
}

.get-lofi-button:hover .icon-container {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.15);
}

.get-lofi-button:hover .swap-icon {
  transform: scale(1.1);
}

.get-lofi-button:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(168, 184, 237, 0.3), 
              0 1px 4px rgba(0, 0, 0, 0.1);
}

.button-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .lofi-dashboard-corner {
    bottom: 20px;
    right: 20px;
  }
  
  .get-lofi-button {
    padding: 10px 16px;
    border-radius: 24px;
    gap: 10px;
  }
  
  .icon-container {
    width: 24px;
    height: 24px;
    border-radius: 12px;
  }
  
  .swap-icon {
    width: 14px;
    height: 14px;
  }
  
  .button-text {
    font-size: 14px;
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .lofi-dashboard-corner {
    bottom: 22px;
    right: 22px;
  }
  
  .get-lofi-button {
    padding: 13px 22px;
    font-size: 15px;
  }
}