/*
 * Application-wide base styles
 * Rails 8 uses Propshaft instead of Sprockets
 * Individual stylesheets are loaded via stylesheet_link_tag in layouts
 */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f7fafc;
  color: #2d3748;
}

/* Application Header */
.app-header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.app-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2d3748;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.app-logo:hover {
  opacity: 0.8;
}

.app-logo img {
  height: 40px;
  width: auto;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.balance-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.balance-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.balance-amount {
  font-weight: 700;
}

.balance-currency {
  opacity: 0.9;
  font-size: 0.9rem;
}

.header-link {
  color: #667eea;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: #f7fafc;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.header-link:hover {
  background: #edf2f7;
  color: #764ba2;
}

.user-email {
  color: #4a5568;
  font-size: 0.9rem;
}

.logout-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logout-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Alerts and Notices */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Footer */
.app-footer {
  margin-top: 3rem;
  padding: 2rem;
  background: #2d3748;
  text-align: center;
  color: white;
}

.app-footer p {
  margin: 0;
  opacity: 0.9;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .app-header-container {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .app-header-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .balance-display,
  .header-link {
    width: 100%;
    justify-content: center;
  }

  .user-email {
    text-align: center;
  }

  .logout-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .app-logo img {
    height: 32px;
  }

  .app-header {
    padding: 0.75rem 0;
  }

  .balance-display {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .header-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

* {
  box-sizing: border-box;
}