/* «العنوان الوطني» — the six fields of a laundry's National Address, shared by
   the owner's profile card, the admin's on-behalf card and the create form
   (js/national-address.js). Colours come from css/main.css only. */

.na-why {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.na-status-row {
  margin-bottom: 14px;
}

.na-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 12px;
  /* Not a pill: on a phone the sentence wraps to three lines, and a pill
     radius turns that into an oval. */
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 100%;
}
.na-status i { margin-top: 0.35em; }
.na-status--ok { color: var(--success-color); border-color: currentColor; }
.na-status--missing { color: var(--error-color); border-color: currentColor; }

.na-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.na-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.na-field--wide { grid-column: 1 / -1; }

.na-label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.na-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  background: var(--secondary-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 150ms ease-out;
}
.na-input:focus {
  outline: none;
  border-color: var(--accent-color);
}
.na-input[aria-invalid="true"] { border-color: var(--error-color); }
.na-input--digits {
  text-align: right;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.na-hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.na-error,
.na-form-error {
  color: var(--error-color);
  font-size: 0.85rem;
  line-height: 1.7;
}
.na-form-error { margin: 12px 0 0; }

.na-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

/* «إنشاء مغسلة»: required in full for a VAT-registered laundry. */
.cl-na-need { color: var(--text-secondary); font-weight: 400; }
.cl-na-need--required { color: var(--error-color); }

/* The owner's banner on «اليوم»: a VAT-registered laundry whose address is
   not complete. */
.na-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text-primary);
}
.na-banner > i {
  color: var(--accent-color);
  font-size: 1.15rem;
  margin-top: 0.2em;
}
.na-banner-text { flex: 1; min-width: 0; line-height: 1.8; }
.na-banner-text b { display: block; }
.na-banner-text p { margin: 2px 0 0; color: var(--text-secondary); font-size: 0.9rem; }
.na-banner-btn {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.na-banner-btn:hover { background: rgba(var(--accent-rgb), 0.12); }

/* The owner's card at its narrowest (320 wide at text size 2 is 160 CSS px):
   the shared card header does not let its title shrink, and the shared save
   button's 44px sides are wider than the card. Scoped to this card only. */
#profile-na-card .card-icon-header { flex-wrap: wrap; gap: 10px 16px; }
#profile-na-card .card-icon-header h3 { min-width: 0; }
.na-actions .primary-gradient-btn { max-width: 100%; }

/* The card on the screen a laundry waiting for approval sees: that screen is
   centred text, the card reads right to left from its start. */
.na-pending {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: start;
}
.na-pending-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
}
.na-pending-title i { color: var(--accent-color); }
.na-pending .page-hint { margin-bottom: 12px; }

/* Sign-up section 12: the fields sit above the section's «متابعة». */
.ob-na { margin-bottom: 16px; }

/* The admin's on-behalf save: its row keeps every button on one line
   (`.obs-reason-row .obs-btn` in css/dashboard.css), which at the largest
   text ran «حفظ نيابةً عن المالك» out of its button. This one may wrap. */
.obs-reason-row #obs-na-save { white-space: normal; flex-wrap: wrap; justify-content: center; text-align: center; }

@media (max-width: 560px) {
  .na-grid { grid-template-columns: minmax(0, 1fr); }
  /* The icon may take its own line: at 320 wide and text size 2 the
     profile card left «الوطني» no room beside it. */
  .na-actions .primary-gradient-btn { width: 100%; justify-content: center; padding-inline: 16px; white-space: normal; flex-wrap: wrap; text-align: center; }
  .na-banner { flex-wrap: wrap; }
  .na-banner-btn { width: 100%; }
}
