/* Apple Pay Web App Styles */
/* Optimized for mobile WebView performance */

/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Container */
.container {
  max-width: 400px;
  width: 100%;
  padding: 24px;
}

/* Header section */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.header h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
}

.header p {
  margin: 0;
  color: #86868b;
  font-size: 16px;
}

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

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #d1d1d6;
  border-top: 3px solid #007aff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

/* Error state */
.error {
  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  text-align: center;
}

.error-title {
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* Version info display (bottom-left corner) */
.version-info {
  position: fixed;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  color: #666;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

.version-info__deploy {
  font-weight: 600;
  font-size: 11px;
  color: #333;
  margin-bottom: 2px;
}

.version-info__sdk {
  font-size: 11px;
  color: #999;
}

/* Responsive design for smaller screens */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .container {
    padding: 20px;
  }

  .header h1 {
    font-size: 20px;
  }

  .header p {
    font-size: 14px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .container {
    border: 2px solid #333;
  }

  .error {
    border-width: 2px;
  }

  .version-info {
    border: 1px solid #333;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1c1c1e;
    color: #ffffff;
  }

  .container {
    background: #2c2c2e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .header h1 {
    color: #ffffff;
  }

  .header p {
    color: #8e8e93;
  }

  .loading-spinner {
    border-color: #3a3a3c;
    border-top-color: #007aff;
  }

  .version-info {
    background: rgba(44, 44, 46, 0.95);
    color: #8e8e93;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  }

  .version-info__deploy {
    color: #ffffff;
  }

  .version-info__sdk {
    color: #8e8e93;
  }
}
