/* =========================================================================
   Oshida Forms — استایل سمت کاربر
   طراحی بر اساس فایل فیگمای O-S-H-I-D-A (بخش Collaboration)
   ========================================================================= */

.oshida-root,
.oshida-buttons,
.oshida-btn {
	--oshida-accent: #A79579;
	--oshida-bg: #1a1a1a;
	--oshida-bg-2: #282828;
	--oshida-card: #232323;
	--oshida-card-2: #2b2b2b;
	--oshida-line: #3a3a3a;
	--oshida-line-soft: rgba(255, 255, 255, .07);
	--oshida-text: #f2f2f2;
	--oshida-muted: #8f8f8f;
	--oshida-danger: #e06a6a;
	--oshida-radius: 22px;
	font-family: "IRANSansX", "IRANSans", "Vazirmatn", "Yekan Bakh", "Segoe UI", Tahoma, sans-serif;
}

/* ------------------------------- دکمه‌ها -------------------------------- */

.oshida-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	direction: rtl;
}

.oshida-align-center { justify-content: center; }
.oshida-align-right  { justify-content: flex-start; }
.oshida-align-left   { justify-content: flex-end; }

.oshida-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: transform .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease;
	direction: rtl;
}

.oshida-btn:hover { transform: translateY(-1px); }
.oshida-btn:focus-visible { outline: 2px solid var(--oshida-accent); outline-offset: 3px; }
.oshida-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.oshida-btn--primary {
	background: var(--oshida-accent);
	color: #1c1c1c;
}

.oshida-btn--primary:hover { background: #bda98a; }

.oshida-btn--ghost {
	background: rgba(255, 255, 255, .04);
	border-color: var(--oshida-line);
	color: var(--oshida-text);
}

.oshida-btn--ghost:hover { border-color: var(--oshida-accent); }

.oshida-arrow {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

/* -------------------------------- مودال -------------------------------- */

.oshida-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	overflow: hidden;
}

.oshida-modal[hidden] { display: none; }

.oshida-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 8, .78);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: oshida-fade .25s ease;
}

.oshida-modal__dialog {
	position: relative;
	width: min(1180px, 100%);
	max-height: calc(100vh - 48px);
	background: linear-gradient(180deg, #141414 0%, var(--oshida-bg-2) 55%);
	border: 1px solid var(--oshida-line-soft);
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
	animation: oshida-rise .3s cubic-bezier(.22, 1, .36, 1);
}

.oshida-modal__scroll {
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 56px 40px 44px;
}

.oshida-modal__close {
	position: absolute;
	inset-inline-end: 22px;
	top: 20px;
	z-index: 3;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--oshida-line);
	background: rgba(255, 255, 255, .04);
	color: var(--oshida-text);
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}

.oshida-modal__close:hover { border-color: var(--oshida-accent); background: rgba(255, 255, 255, .08); }
.oshida-modal__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@keyframes oshida-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes oshida-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

body.oshida-locked { overflow: hidden; }

/* ------------------------------ ظرف درون‌صفحه --------------------------- */

.oshida-root--inline {
	background: linear-gradient(180deg, #141414 0%, var(--oshida-bg-2) 55%);
	border: 1px solid var(--oshida-line-soft);
	border-radius: 28px;
	padding: 48px 32px 40px;
}

.oshida-root * { box-sizing: border-box; }

/* -------------------------------- سربرگ -------------------------------- */

.oshida-form__head {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 36px;
}

.oshida-icon {
	display: inline-grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	color: var(--oshida-form-accent, var(--oshida-accent));
}

.oshida-icon svg {
	width: 46px;
	height: 46px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.oshida-form__title {
	margin: 0 0 14px;
	font-size: clamp(22px, 3vw, 34px);
	font-weight: 800;
	line-height: 1.6;
	color: #fff;
}

.oshida-form__intro,
.oshida-form__tagline {
	margin: 0;
	font-size: 13.5px;
	line-height: 2.1;
	color: var(--oshida-muted);
}

/* -------------------------------- کارت --------------------------------- */

.oshida-card {
	background: var(--oshida-card);
	border: 1px solid var(--oshida-line-soft);
	border-radius: var(--oshida-radius);
	padding: 30px 32px 34px;
	margin-bottom: 20px;
}

.oshida-card__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 26px;
	font-size: 15px;
	font-weight: 700;
	color: var(--oshida-text);
}

.oshida-card__dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid var(--oshida-muted);
	position: relative;
	flex: none;
}

.oshida-card__dot::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: var(--oshida-accent);
}

.oshida-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 24px;
}

.oshida-field.is-full { grid-column: 1 / -1; }

/* ------------------------------ ورودی متنی ----------------------------- */

.oshida-input {
	position: relative;
	display: block;
}

.oshida-input__label {
	position: absolute;
	top: -8px;
	inset-inline-start: 16px;
	padding: 0 8px;
	background: var(--oshida-card);
	font-size: 11.5px;
	font-weight: 500;
	color: var(--oshida-muted);
	pointer-events: none;
	white-space: nowrap;
	max-width: calc(100% - 32px);
	overflow: hidden;
	text-overflow: ellipsis;
}

.oshida-input__label i {
	font-style: normal;
	color: var(--oshida-accent);
	margin-inline-start: 3px;
}

.oshida-input input,
.oshida-input textarea {
	width: 100%;
	min-height: 54px;
	padding: 16px 18px;
	background: transparent;
	border: 1px solid var(--oshida-line);
	border-radius: 12px;
	color: var(--oshida-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.9;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.oshida-input textarea {
	min-height: 150px;
	resize: vertical;
}

.oshida-input input::placeholder,
.oshida-input textarea::placeholder {
	color: #5f5f5f;
	font-size: 13px;
}

.oshida-input input:focus,
.oshida-input textarea:focus {
	outline: none;
	border-color: var(--oshida-accent);
	box-shadow: 0 0 0 3px rgba(167, 149, 121, .12);
}

.oshida-input input[dir="ltr"],
.oshida-input input[type="email"] { text-align: start; }

/* ------------------------------ گزینه‌ها ------------------------------- */

.oshida-optionset {
	border: 1px solid var(--oshida-line);
	border-radius: 14px;
	padding: 24px 18px 18px;
	margin: 0;
	position: relative;
}

.oshida-optionset > legend {
	position: static;
	float: inline-start;
	width: auto;
	margin: 0;
	padding: 0 8px;
	transform: translateY(-34px);
	background: var(--oshida-card);
	font-size: 11.5px;
	color: var(--oshida-muted);
}

.oshida-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	clear: both;
}

.oshida-options--inline { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.oshida-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 14px;
	background: var(--oshida-card-2);
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .18s ease, background-color .18s ease;
	min-width: 0;
}

.oshida-opt:hover { border-color: var(--oshida-line); }

.oshida-opt input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.oshida-opt__box {
	width: 16px;
	height: 16px;
	flex: none;
	border: 1.5px solid #6b6b6b;
	border-radius: 4px;
	position: relative;
	transition: border-color .18s ease, background-color .18s ease;
}

.oshida-opt input[type="radio"] + .oshida-opt__box { border-radius: 50%; }

.oshida-opt__box::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231c1c1c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
	background-size: 100% 100%;
	transition: opacity .15s ease;
}

.oshida-opt input:checked + .oshida-opt__box {
	background: var(--oshida-accent);
	border-color: var(--oshida-accent);
}

.oshida-opt input:checked + .oshida-opt__box::after { opacity: 1; }

.oshida-opt input:checked ~ .oshida-opt__text { color: #fff; }

.oshida-opt input:focus-visible + .oshida-opt__box {
	box-shadow: 0 0 0 3px rgba(167, 149, 121, .3);
}

.oshida-opt:has(input:checked) {
	background: rgba(167, 149, 121, .09);
	border-color: rgba(167, 149, 121, .45);
}

.oshida-opt__text {
	font-size: 13px;
	color: #c9c9c9;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.oshida-other { margin-top: 14px; }

/* -------------------------------- برچسب‌ها ----------------------------- */

.oshida-tags { position: relative; }

.oshida-tags > .oshida-input__label {
	position: absolute;
	top: -8px;
	inset-inline-start: 16px;
	z-index: 2;
}

.oshida-tags__box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-height: 54px;
	padding: 12px 16px;
	border: 1px solid var(--oshida-line);
	border-radius: 12px;
}

.oshida-tags__box:focus-within { border-color: var(--oshida-accent); }

.oshida-tags__list {
	display: contents;
	list-style: none;
	margin: 0;
	padding: 0;
}

.oshida-tags__list li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: rgba(167, 149, 121, .14);
	border: 1px solid rgba(167, 149, 121, .35);
	border-radius: 999px;
	font-size: 12.5px;
	color: #e7e0d4;
}

.oshida-tags__list button {
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	padding: 0;
	opacity: .7;
}

.oshida-tags__list button:hover { opacity: 1; }

.oshida-tags__input {
	flex: 1 1 140px;
	min-width: 140px;
	border: 0;
	background: none;
	color: var(--oshida-text);
	font-family: inherit;
	font-size: 13.5px;
	padding: 6px 0;
}

.oshida-tags__input:focus { outline: none; }
.oshida-tags__input::placeholder { color: #5f5f5f; }

.oshida-help {
	margin: 8px 2px 0;
	font-size: 11.5px;
	color: #6f6f6f;
}

/* -------------------------------- فایل --------------------------------- */

.oshida-file { position: relative; }

.oshida-file > .oshida-input__label {
	position: absolute;
	top: -8px;
	inset-inline-start: 16px;
	z-index: 2;
}

.oshida-file__box {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 54px;
	padding: 10px 12px 10px 14px;
	border: 1px dashed var(--oshida-line);
	border-radius: 12px;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}

.oshida-file__box:hover { border-color: var(--oshida-accent); background: rgba(255, 255, 255, .02); }

.oshida-file__icon {
	width: 32px;
	height: 32px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 8px;
	background: var(--oshida-card-2);
	color: var(--oshida-muted);
}

.oshida-file__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.oshida-file__name {
	font-size: 13px;
	color: #5f5f5f;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.oshida-file.has-file .oshida-file__name { color: var(--oshida-text); }
.oshida-file.has-file .oshida-file__box { border-style: solid; border-color: rgba(167, 149, 121, .5); }
.oshida-file input[type="file"] { position: absolute; opacity: 0; width: 0; height: 0; }

/* ------------------------------ کلید روشن/خاموش ------------------------ */

.oshida-switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	padding: 14px 16px;
	background: var(--oshida-card-2);
	border-radius: 12px;
}

.oshida-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.oshida-switch__track {
	width: 44px;
	height: 24px;
	flex: none;
	border-radius: 999px;
	background: #4a4a4a;
	position: relative;
	transition: background-color .2s ease;
}

.oshida-switch__thumb {
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #d9d9d9;
	transition: transform .2s ease;
}

.oshida-switch input:checked + .oshida-switch__track { background: var(--oshida-accent); }
.oshida-switch input:checked + .oshida-switch__track .oshida-switch__thumb { transform: translateX(-20px); }

.oshida-switch__text { font-size: 13.5px; color: #c9c9c9; }

/* ------------------------------- خطاها --------------------------------- */

.oshida-field__error {
	margin: 8px 4px 0;
	font-size: 11.5px;
	color: var(--oshida-danger);
}

.oshida-field.has-error .oshida-input input,
.oshida-field.has-error .oshida-input textarea,
.oshida-field.has-error .oshida-optionset,
.oshida-field.has-error .oshida-tags__box,
.oshida-field.has-error .oshida-file__box {
	border-color: var(--oshida-danger);
}

.oshida-form__alert {
	margin: 0 0 16px;
	padding: 14px 18px;
	border-radius: 12px;
	background: rgba(224, 106, 106, .12);
	border: 1px solid rgba(224, 106, 106, .4);
	color: #f0b4b4;
	font-size: 13px;
	text-align: center;
}

/* ------------------------------ ناوبری گام‌ها -------------------------- */

.oshida-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 30px;
}

.oshida-nav__arrow {
	width: 30px;
	height: 30px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--oshida-line);
	background: none;
	color: var(--oshida-muted);
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, opacity .2s ease;
}

.oshida-nav__arrow:hover:not([disabled]) { color: var(--oshida-accent); border-color: var(--oshida-accent); }
.oshida-nav__arrow[disabled] { opacity: .3; cursor: default; }
.oshida-nav__arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.oshida-progress {
	position: relative;
	flex: 0 1 240px;
	height: 2px;
	background: #393939;
	border-radius: 2px;
	overflow: hidden;
}

.oshida-progress__bar {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	height: 100%;
	background: var(--oshida-accent);
	transition: width .3s ease;
}

.oshida-stepcount {
	margin: 12px 0 0;
	text-align: center;
	font-size: 12px;
	color: var(--oshida-muted);
}

.oshida-submitrow {
	display: flex;
	justify-content: center;
	margin-top: 22px;
}

.oshida-submitrow .oshida-btn { min-width: 190px; justify-content: center; }

.oshida-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ------------------------------ صفحهٔ انتخاب --------------------------- */

.oshida-chooser__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	max-width: 760px;
	margin: 0 auto;
}

.oshida-choice {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 34px 24px 26px;
	background: var(--oshida-card);
	border: 1px solid var(--oshida-line-soft);
	border-radius: var(--oshida-radius);
	cursor: pointer;
	text-align: center;
	color: var(--oshida-text);
	font-family: inherit;
	transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}

.oshida-choice:hover {
	border-color: var(--oshida-accent);
	transform: translateY(-2px);
	background: #262626;
}

.oshida-choice__badge {
	position: absolute;
	top: 16px;
	inset-inline-start: 18px;
	font-size: 11px;
	color: #5f5f5f;
}

.oshida-choice .oshida-icon { width: 52px; height: 52px; margin-bottom: 4px; }
.oshida-choice .oshida-icon svg { width: 38px; height: 38px; }

.oshida-choice__title { font-size: 17px; font-weight: 700; }
.oshida-choice__desc { font-size: 12.5px; color: var(--oshida-muted); line-height: 1.9; }

.oshida-choice__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding-top: 14px;
	border-top: 1px solid var(--oshida-line-soft);
	width: 100%;
	justify-content: center;
	font-size: 13px;
	color: var(--oshida-accent);
}

/* -------------------------------- موفقیت ------------------------------- */

.oshida-success {
	text-align: center;
	padding: 60px 24px;
	max-width: 620px;
	margin: 0 auto;
}

.oshida-success[hidden] { display: none; }
.oshida-success .oshida-icon { color: var(--oshida-accent); }
.oshida-success__title { margin: 8px 0 12px; font-size: 24px; font-weight: 800; color: #fff; }
.oshida-success__text { margin: 0 0 26px; font-size: 14px; line-height: 2.1; color: var(--oshida-muted); }

/* ------------------------------- واکنش‌گرا ----------------------------- */

@media (max-width: 900px) {
	.oshida-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.oshida-options--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
	.oshida-modal { padding: 0; }
	.oshida-modal__dialog { border-radius: 0; max-height: 100vh; width: 100%; }
	.oshida-modal__scroll { max-height: 100vh; padding: 64px 16px 32px; }
	.oshida-root--inline { padding: 32px 16px; border-radius: 18px; }
	.oshida-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.oshida-card { padding: 24px 18px 26px; }
	.oshida-options,
	.oshida-options--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.oshida-chooser__grid { grid-template-columns: minmax(0, 1fr); }
	.oshida-form__title { font-size: 21px; }
	.oshida-buttons { flex-direction: column; }
	.oshida-buttons .oshida-btn { justify-content: center; }
}

@media (max-width: 420px) {
	.oshida-options,
	.oshida-options--inline { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.oshida-root *,
	.oshida-modal * { animation: none !important; transition: none !important; }
}
