/* Customer request form ([foreign_order_request]). Scoped under .fo-req and
 * resetting what themes commonly override. Persian text must never get
 * letter-spacing (it breaks the joined letters). */
.fo-req {
	--fo-ink: #111;
	--fo-muted: #6b7280;
	--fo-line: #e5e7eb;
	--fo-line-2: #d1d5db;
	--fo-soft: #f7f7f8;
	--fo-danger: #dc2626;
	--fo-ok: #15803d;
	direction: rtl;
	text-align: right;
	max-width: 760px;
	margin: 0 auto;
	color: var(--fo-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.8;
}
.fo-req *, .fo-req *::before, .fo-req *::after { box-sizing: border-box; letter-spacing: normal !important; }
.fo-req .fo-hidden, .fo-req [hidden] { display: none !important; }
.fo-req h2, .fo-req h3, .fo-req h4, .fo-req p, .fo-req ul { margin: 0; padding: 0; }
.fo-req ul { list-style: none; }
.fo-req li::before, .fo-req li::marker { content: none; }

.fo-req-hero { text-align: center; padding: 6px 8px 18px; }
.fo-req-hero h2 { font-size: clamp(22px, 4vw, 28px); font-weight: 900; line-height: 1.4; }
.fo-req-hero p { color: var(--fo-muted); margin-top: 6px; }

.fo-req-section, .fo-req-recent, .fo-req-done { background: #fff; border: 1px solid var(--fo-line); border-radius: 20px; padding: 20px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 10px 30px -18px rgba(0,0,0,.25); }
.fo-req-h { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin-bottom: 14px !important; }
.fo-req-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--fo-ink); color: #fff; font-size: 15px; font-weight: 800; flex: none; }

.fo-req-item { border: 1.5px solid var(--fo-line); border-radius: 16px; padding: 16px; margin-bottom: 12px; background: var(--fo-soft); }
.fo-req-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fo-req-item-title { font-size: 16px; font-weight: 800; }

.fo-req .fo-field { margin: 0 0 12px; }
.fo-req label { display: block; margin: 0 0 6px; font-weight: 700; font-size: 14px; color: var(--fo-ink); }
.fo-req-star { color: var(--fo-danger); }
.fo-req-hint { display: block; color: var(--fo-muted); font-size: 12.5px; margin: -2px 0 8px; }
.fo-req input:not([type=checkbox]):not([type=file]), .fo-req textarea {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	max-width: none;
	min-height: 50px;
	margin: 0;
	padding: 12px 14px;
	border: 1.5px solid var(--fo-line-2);
	border-radius: 14px;
	background: #fff;
	color: var(--fo-ink);
	font: inherit;
	font-size: 16px; /* no zoom on iOS */
	line-height: 1.5;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}
.fo-req textarea { min-height: 84px; resize: vertical; }
.fo-req input:focus, .fo-req textarea:focus { outline: none; border-color: var(--fo-ink); box-shadow: 0 0 0 4px rgba(17, 17, 17, .08); }
.fo-req input::placeholder, .fo-req textarea::placeholder { color: #9ca3af; opacity: 1; }
.fo-req .fo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fo-req .fo-row-3 { grid-template-columns: 1fr 1fr 90px; }

.fo-req-images { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-req-thumb, .fo-req-upload { position: relative; width: 88px; height: 88px; border-radius: 14px; overflow: hidden; flex: none; }
.fo-req-thumb { border: 1px solid var(--fo-line-2); background: #fff; display: grid; place-items: center; text-align: center; }
.fo-req-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fo-req-thumb.is-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--fo-muted); font-size: 11px; }
.fo-req-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--fo-line); border-top-color: var(--fo-ink); animation: fo-spin .8s linear infinite; }
@keyframes fo-spin { to { transform: rotate(360deg); } }
.fo-req .fo-req-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; border: 2px dashed var(--fo-line-2); background: #fff; color: var(--fo-ink); cursor: pointer; font-weight: 700; }
.fo-req-upload span { font-size: 26px; line-height: 1; }
.fo-req-upload small { font-size: 11.5px; color: var(--fo-muted); font-weight: 600; }
.fo-req-upload:hover { border-color: var(--fo-ink); }
.fo-req button.fo-req-thumb-remove { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }

.fo-req button.fo-req-add, .fo-req button.fo-req-submit, .fo-req .fo-req-btn {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 10px 18px;
	border-radius: 14px;
	font: inherit;
	font-weight: 800;
	font-size: 16px;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}
.fo-req button.fo-req-add { border: 2px dashed var(--fo-line-2); background: #fff; color: var(--fo-ink); }
.fo-req button.fo-req-add:hover { border-color: var(--fo-ink); }
.fo-req button.fo-req-submit, .fo-req .fo-req-btn--primary { border: 0; background: var(--fo-ink); color: #fff; }
.fo-req button.fo-req-submit { min-height: 58px; font-size: 17px; }
.fo-req button:disabled { opacity: .6; cursor: wait; }
.fo-req .fo-req-btn { border: 1.5px solid var(--fo-ink); background: #fff; color: var(--fo-ink); }
.fo-req .fo-req-btn--primary { color: #fff; }
.fo-req .fo-req-btn--ghost { border-color: var(--fo-line-2); color: var(--fo-muted); }
.fo-req button.fo-req-link { background: none; border: 0; min-height: 0; padding: 0; margin: 0; color: var(--fo-danger); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; box-shadow: none; }

.fo-req .fo-invalid input, .fo-req .fo-invalid textarea, .fo-req .fo-invalid .fo-req-upload { border-color: var(--fo-danger); }
.fo-req .fo-err, .fo-req .fo-form-error { display: block; color: var(--fo-danger); margin-top: 6px; font-size: 13.5px; font-weight: 600; }
.fo-req .fo-form-error { text-align: center; margin: 0 0 10px; }
.fo-req-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fo-req-draft { padding: 10px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; margin-bottom: 14px; font-size: 14px; }

.fo-req-recent h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.fo-req-recent li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--fo-line); }
.fo-req-recent li:last-child { border-bottom: 0; }
.fo-req-recent a { color: var(--fo-ink); font-weight: 700; }
.fo-req-recent small { color: var(--fo-muted); }

.fo-req-done { text-align: center; }
.fo-req-check { width: 72px; height: 72px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--fo-ok); color: #fff; font-size: 36px; font-weight: 900; box-shadow: 0 0 0 10px #f0fdf4; }
.fo-req-done-title { font-size: 20px; font-weight: 900; }
.fo-req-done-text { color: var(--fo-muted); margin: 6px 0 12px !important; }
.fo-req-link-box { direction: ltr; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--fo-soft); border: 1px dashed var(--fo-line-2); font-size: 13px; overflow-wrap: anywhere; margin-bottom: 12px; }
.fo-req-done-actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 520px) {
	.fo-req-section, .fo-req-recent, .fo-req-done { padding: 16px; border-radius: 18px; }
	.fo-req-item { padding: 12px; }
	.fo-req .fo-row-3 { grid-template-columns: 1fr 1fr; }
	.fo-req .fo-row-3 .fo-field[data-field="quantity"] { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .fo-req-spin { animation: none; } }
