/**
 * Modal Styles
 * Global modal overlay and container styles
 */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
  display: flex;
}

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

.modal {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* === Buttons === */
.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: #4285f4;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #3367d6;
}

.btn-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* === Pool Info Section === */
.pool-info {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.pool-info-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.pool-info-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* === Form Elements === */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  color: #111827;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* === KPI Cards Grid === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.kpi-card {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.kpi-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.kpi-value.highlight {
  color: #4285f4;
  font-size: 28px;
}

/* === Error Message === */
.error-message {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-icon {
  font-size: 20px;
  color: #dc2626;
}

.error-text {
  font-size: 14px;
  color: #991b1b;
  flex: 1;
}

/* === Success Message === */
.success-message {
  text-align: center;
  padding: 32px 24px 24px;
  margin-bottom: 24px;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: #549B9F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  font-weight: bold;
}

.success-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
  letter-spacing: -0.019em;
}

.success-text {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

/* === Sponsorship Details === */
.sponsorship-details {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 15px;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}

/* Special styling for status value - make it teal */
.detail-row:last-child .detail-value {
  color: #549B9F;
}

/* === Wallet Connection === */
.wallet-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.wallet-option:hover {
  background: #f3f4f6;
  border-color: #549B9F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(84, 155, 159, 0.15);
}

.wallet-icon {
  font-size: 40px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wallet-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.wallet-details {
  flex: 1;
}

.wallet-name {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.wallet-description {
  font-size: 14px;
  color: #6b7280;
}

/* === Test Mode Toggle === */
.test-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: #fef3c7;
  border: 2px solid #fcd34d;
  border-radius: 12px;
  margin-bottom: 16px;
}

.test-mode-icon {
  font-size: 24px;
}

.test-mode-label {
  font-size: 15px;
  font-weight: 600;
  color: #92400e;
}

/* === Loading Spinner === */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e5e7eb;
  border-top-color: #549B9F;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Navigation Wallet Button === */
.wallet-button {
  padding: 10px 20px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.wallet-button:hover {
  background: #3d7c7f;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(84, 155, 159, 0.3);
}

.wallet-button-connected {
  background: white;
  color: var(--color-text-dark);
  border: 2px solid var(--color-border);
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.wallet-button-connected:hover {
  background: var(--color-bg-light);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* === Wallet Dropdown === */
.wallet-dropdown-container {
  position: relative;
}

.wallet-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
}

.wallet-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.wallet-dropdown-item:last-child {
  border-bottom: none;
}

.wallet-dropdown-item:hover {
  background: var(--color-bg-light);
}

.wallet-dropdown-item span {
  font-size: 18px;
}
