@charset "UTF-8";

:root {
  --bg-sand: #f5f0ea;
  --card-bg: #ffffff;
  --primary-red: #9e1b20;
  --primary-red-hover: #831418;
  --gold-accent: #c5a059;
  --gold-light: #f7f3eb;
  --text-dark: #2b2523;
  --text-muted: #6b635e;
  --border-color: #e6ded5;
  --success: #2e7d32;
  --error: #c62828;
  --font-stack: "Vazirmatn", "Vazir", "IRANSans", system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-sand);
  background-image: radial-gradient(#e3dad0 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
}

.niat-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  box-shadow: 0 10px 30px rgba(74, 49, 36, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.niat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold-accent), var(--primary-red), var(--gold-accent));
}

.hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo-wrapper {
  margin-bottom: 0.75rem;
  display: inline-block;
}

.center-logo {
  max-width: 100px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(158, 27, 32, 0.12);
  border: 2px solid var(--gold-light);
}

.campaign-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-red);
  margin-bottom: 0.35rem;
  letter-spacing: -0.3px;
}

.campaign-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.55;
  padding: 0 0.5rem;
}

.total-box {
  background: linear-gradient(145deg, var(--gold-light) 0%, #fff 100%);
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  border-radius: 16px;
  padding: 1.1rem 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.total-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.counter-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
}

.total-box strong {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-red);
  font-feature-settings: "ss01";
  line-height: 1;
}

.total-box .unit {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.niat-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.input-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
}

.selected-amount {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: 1.5px dashed #d9cbb7;
  border-radius: 14px;
  background: #fcfbf8;
  color: #887866;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
}

.selected-amount.has-value {
  border-style: solid;
  border-color: var(--gold-accent);
  background: #fff8ec;
  color: var(--primary-red);
}

.quick-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.amount-btn {
  min-height: 56px;
  border: 1.5px solid #e2d8ca;
  border-radius: 14px;
  background: #faf6ef;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.amount-btn:hover {
  background: #efe6d8;
  border-color: var(--gold-accent);
  transform: translateY(-1px);
}

.amount-btn:focus-visible {
  outline: 3px solid rgba(158, 27, 32, 0.18);
  outline-offset: 2px;
}

.amount-btn.is-selected {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(158, 27, 32, 0.22);
}

.submit-btn {
  min-height: 54px;
  background: linear-gradient(135deg, var(--primary-red), var(--primary-red-hover));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(158, 27, 32, 0.22);
  transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(158, 27, 32, 0.28);
}

.submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.submit-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
}

.message {
  min-height: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
  margin-top: 0.25rem;
}

.message.ok {
  color: var(--success);
}

.message.err {
  color: var(--error);
}

@media (max-width: 380px) {
  .niat-card {
    padding: 1.5rem 1.25rem;
  }

  .campaign-title {
    font-size: 1.2rem;
  }

  .campaign-subtitle {
    font-size: 0.85rem;
  }

  .total-box strong {
    font-size: 1.85rem;
  }

  .quick-buttons {
    gap: 0.55rem;
  }

  .amount-btn {
    min-height: 52px;
    font-size: 0.96rem;
  }
}
