/* Earn page specific styles */
.earn-body {
  background: #0E0F1E;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.earn-container {
  background: #1C1F2E;
  color: white;
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.earn-header {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  color: #fff;
}

.pool-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pool-card {
  background: rgba(39, 174, 96, 0.25); /* Light green with 0.25 opacity */
  border: 1px solid rgba(39, 174, 96, 0.4);
  border-radius: 1rem;
  padding: 1.5rem;
}

.pool-card-blue {
  background: rgba(59, 130, 246, 0.1); /* Pale blue with some transparency */
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
}

.pool-card-dark-blue {
  background: rgba(67, 56, 202, 0.25); /* Darker blue/purple with transparency */
  border: 1px solid rgba(67, 56, 202, 0.4);
  border-radius: 1rem;
  padding: 1.5rem;
}

.pool-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 40px;
  align-items: center;
  gap: 1rem;
}

.pool-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pool-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.pool-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fff;
}

.pool-subtitle {
  color: #9CA3AF;
  font-size: 0.875rem;
}

.pool-tvl {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tvl-amount {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.tvl-token {
  color: #9CA3AF;
  font-size: 0.875rem;
}

.pool-apr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
}

.pool-apr span {
  white-space: nowrap;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4B5563;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  color: #fff;
  margin-left: 0.25rem;
}

.info-icon .tooltip {
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #374151;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 12px;
  white-space: pre-line;
  margin-top: 5px;
  z-index: 1;
  text-align: left;
  min-width: 200px;
}

.info-icon:hover .tooltip {
  visibility: visible;
}

.pool-deposit {
  text-align: right;
  font-size: 1.25rem;
  font-weight: 600;
}

.pool-earned {
  text-align: right;
  font-size: 1.25rem;
  font-weight: 600;
}

.expand-button {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.expand-button:hover {
  color: #fff;
}

.expand-button svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.3s;
}

.pool-card.active .expand-button svg,
.pool-card-blue.active .expand-button svg,
.pool-card-dark-blue.active .expand-button svg {
  transform: rotate(180deg);
}

.pool-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.pool-card.active .pool-content,
.pool-card-blue.active .pool-content,
.pool-card-dark-blue.active .pool-content {
  max-height: 650px;
  margin-top: 1.5rem;
  overflow: visible;
}

.pool-details {
  background: rgba(28, 31, 46, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.pool-description, .apr-info, .earn-info {
  color: #9CA3AF;
  font-size: 0.875rem;
}

.earn-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  color: #9CA3AF;
}

.small-logo {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #fff;
}

.pool-description {
  margin-bottom: 1.25rem;
}

.apr-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.earn-info {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.earn-token-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

.pool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

.action-button,
.withdraw-button,
.claim-button,
.claim-crv-button,
.deposit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563EB;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 140px;
  height: 40px;
  white-space: nowrap;
  margin: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

.action-button:hover,
.deposit-button:hover {
  background: #1D4ED8;
}

.withdraw-button {
  background: #4B5563;
}

.withdraw-button:hover {
  background: #374151;
}

.claim-button,
.claim-crv-button {
  background: #991B1B;
}

.claim-button:hover,
.claim-crv-button:hover {
  background: #7F1D1D;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 40px;
  padding: 1rem 1.5rem;
  color: #9CA3AF;
  font-size: 0.875rem;
  font-weight: 500;
}

.table-header > div:nth-child(4),
.table-header > div:nth-child(5) {
  text-align: right;
}

@media (max-width: 768px) {
  .pool-header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .table-header {
    display: none;
  }

  .pool-deposit {
    text-align: left;
  }

  .expand-button {
    justify-self: flex-end;
  }

  .pool-actions {
    flex-direction: column;
  }
}