/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f9f9f9;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1a73e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Layout ── */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

header h1 a {
  color: inherit;
}

header h1 a:hover {
  text-decoration: none;
  color: #1a73e8;
}

.subtitle {
  color: #666;
  font-size: 0.95rem;
}

main {
  flex: 1;
}

footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: #999;
}

.logo-link {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.7;
}

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

.footer-links {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #999;
  font-size: 0.8rem;
}

.footer-links a:hover {
  color: #666;
}

.footer-separator {
  margin: 0 0.5rem;
  color: #ccc;
}

.powered-by {
  font-size: 0.7rem;
  color: #bbb;
  margin-bottom: 0.25rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

.disclaimer {
  font-size: 0.65rem;
  color: #999;
  margin-top: 1rem;
  font-style: italic;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

/* ── Legal Pages ── */
.legal-content h2 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.7;
}

.legal-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-date {
  color: #999;
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 1rem;
}

/* ── Form ── */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.required {
  color: #d93025;
}

.optional {
  font-weight: 400;
  color: #888;
  font-size: 0.85rem;
}

.radio-group {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
  font-size: 0.95rem;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  margin: 0;
}

.hint {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.3rem;
}

input[type="email"],
input[type="text"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: #222;
  transition: border-color 0.15s;
}

/* ── Phone Input Group ── */
.phone-input-group {
  display: flex;
  gap: 0.5rem;
}

.phone-input-group .country-code-select {
  flex: 0 0 auto;
  width: 110px;
}

.phone-input-group input[type="tel"] {
  flex: 1;
  min-width: 0;
}

input:focus,
select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
  text-align: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: #1558b0;
}

.btn-danger {
  background: #d93025;
  color: #fff;
  width: 100%;
}

.btn-danger:hover:not(:disabled) {
  background: #b3261e;
}

.btn-donate {
  background: #ffdd57;
  color: #333;
  font-size: 1.1rem;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-donate:hover:not(:disabled) {
  background: #ffd73d;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ── Notices ── */
.notice {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.notice-warning {
  background: #fff8e1;
  color: #8a6d00;
  border: 1px solid #ffe082;
}

.notice-urgent {
  background: #d32f2f;
  color: #fff;
  border: 1px solid #b71c1c;
  font-weight: 500;
}

.notice-urgent a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

/* ── Messages ── */
.message {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.message-success {
  background: #e6f4ea;
  color: #1e7e34;
  border: 1px solid #b7dfbf;
}

.message-error {
  background: #fce8e6;
  color: #d93025;
  border: 1px solid #f5c6c2;
}

.message-error .btn {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ── Loading spinner ── */
.loading {
  text-align: center;
  padding: 3rem 0;
  color: #666;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #1a73e8;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.7s linear infinite;
}

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

/* ── Alert cards ── */
.alert-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
}

.alert-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.alert-card .meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.alert-card .availability {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.availability.in-stock {
  background: #e6f4ea;
  color: #1e7e34;
}

.availability.out-of-stock {
  background: #fce8e6;
  color: #d93025;
}

.alert-card .store-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2rem 0 1.5rem;
}

/* ── Donation Section ── */
.donation-section {
  margin-top: 3rem;
  text-align: center;
}

.donation-text {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.donation-amount-group {
  margin-bottom: 1.5rem;
}

.donation-amount-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
}

.preset-amounts {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.btn-preset {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 60px;
}

.btn-preset:hover {
  border-color: #ffdd57;
  background: #fffef5;
}

.btn-preset.active {
  border-color: #ffdd57;
  background: #ffdd57;
  color: #333;
}

.custom-amount-input {
  position: relative;
  max-width: 200px;
  margin: 0 auto;
}

.currency-symbol {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
  pointer-events: none;
}

.custom-amount-input input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2rem;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  background: #fff;
  color: #222;
  text-align: center;
  transition: border-color 0.15s;
}

.custom-amount-input input[type="number"]:focus {
  outline: none;
  border-color: #ffdd57;
  box-shadow: 0 0 0 3px rgba(255, 221, 87, 0.2);
}

/* Hide number input spinners */
.custom-amount-input input[type="number"]::-webkit-inner-spin-button,
.custom-amount-input input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-amount-input input[type="number"] {
  -moz-appearance: textfield;
}

/* ── Responsive ── */
@media (min-width: 480px) {
  .container {
    padding: 3rem 1.5rem;
  }

  header h1 {
    font-size: 2rem;
  }
}
