/* ברירת העיצוב יורשת מהתבנית כל מה שאפשר: הצבעים, הפונט והרדיוס
   נלקחים מהמשתנים של האתר, ויש להם נפילה רק אם אינם מוגדרים. */
.atl { font-family: inherit; color: inherit; direction: rtl; }
.atl * { box-sizing: border-box; }

.atl__drop {
	border: 2px dashed var(--tl-border, #ddd);
	border-radius: var(--tl-radius, 4px);
	background: var(--tl-tint, #f4f2f2);
	padding: 2.2em 1.2em;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.atl__drop:hover,
.atl__drop.is-over {
	border-color: var(--tl-orange, #fc9835);
	background: #fff;
}
.atl__drop-title { font-weight: 700; font-size: 1.1em; margin: 0 0 .35em; }
.atl__drop-hint { margin: 0; font-size: .9em; color: var(--tl-soft, #4a4a4a); }
.atl__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.atl__list { list-style: none; margin: 1.2em 0 0; padding: 0; }
.atl__item {
	display: flex; align-items: center; gap: .75em;
	padding: .6em .8em; margin-bottom: .5em;
	border: 1px solid var(--tl-border, #ddd);
	border-radius: var(--tl-radius, 4px);
	background: #fff;
}
.atl__name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atl__state { flex: 0 0 auto; font-size: .9em; color: var(--tl-soft, #4a4a4a); }
.atl__item.is-error { border-color: #b32d2e; }
.atl__item.is-error .atl__state { color: #b32d2e; }
.atl__bar { flex: 0 0 90px; height: 6px; border-radius: 3px; background: var(--tl-grey, #ecf0f1); overflow: hidden; }
.atl__bar span { display: block; height: 100%; width: 0; background: var(--tl-orange, #fc9835); transition: width .2s; }
.atl__remove { flex: 0 0 auto; background: none; border: 0; color: var(--tl-soft, #4a4a4a); cursor: pointer; font-size: .85em; text-decoration: underline; }

.atl__total { margin: 1.2em 0 0; font-weight: 700; }
.atl__error { margin: 1em 0 0; color: #b32d2e; }
.atl__actions { margin-top: 1.2em; }
.atl__btn {
	display: inline-block; border: 0; cursor: pointer;
	background: var(--tl-orange, #fc9835); color: #fff;
	font: inherit; font-weight: 700;
	padding: .7em 2.2em; border-radius: var(--tl-radius, 4px);
}
.atl__btn:hover { background: var(--tl-orange-dark, #e88d33); }
.atl__btn[disabled] { opacity: .45; cursor: default; }

/* ספינר חוסם על מסך מלא, לשימוש אחרי אישור התשלום. המתג הוא מחלקה על
   body ולא על השכבה עצמה, כדי שאף הקשר ערימה בתבנית לא יוכל לכלוא אותה. */
.atl-processing-overlay {
	display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
	z-index: 2147483600; background: rgba(20,24,35,.78);
	align-items: center; justify-content: center;
}
body.atl-processing .atl-processing-overlay { display: flex; }
body.atl-processing { overflow: hidden; }
.atl-processing-box {
	display: flex; flex-direction: column; align-items: center; gap: 1em;
	padding: 2em 2.5em; min-width: 240px; background: #fff;
	border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
	color: #1d2327; direction: rtl; text-align: center;
}
.atl-processing-circle {
	width: 48px; height: 48px; border: 4px solid #dcdcde;
	border-top-color: var(--tl-orange, #fc9835); border-radius: 50%;
	animation: atl-spin .8s linear infinite;
}
@keyframes atl-spin { to { transform: rotate(360deg); } }

/* ---------- שדות השלבים ---------- */
.atl__step-title { font-weight: 700; margin: 0 0 .6em; }
.atl__field { border: 0; margin: 0 0 1.4em; padding: 0; }
.atl__field legend,
.atl__label { display: block; font-weight: 700; margin: 0 0 .5em; padding: 0; }
.atl__opt { display: flex; align-items: flex-start; gap: .5em; margin: 0 0 .45em; cursor: pointer; }
.atl__opt input { margin-top: .25em; flex: 0 0 auto; }
.atl__opt a { color: var(--tl-orange-dark, #e88d33); }
.atl__text {
	width: 100%; max-width: 420px; font: inherit;
	padding: .55em .7em;
	border: 1px solid var(--tl-border, #ddd);
	border-radius: var(--tl-radius, 4px);
	background: #fff;
}
.atl__text:focus { outline: 2px solid var(--tl-orange, #fc9835); outline-offset: 1px; }
.atl__text--code { max-width: 180px; letter-spacing: .4em; text-align: center; font-size: 1.2em; }
.atl__link {
	background: none; border: 0; font: inherit; cursor: pointer;
	color: var(--tl-soft, #4a4a4a); text-decoration: underline;
	margin-right: 1em; padding: .7em 0;
}
.atl__actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4em; }

/* ---------- שער התשלום ---------- */
.atl__hint { margin: .4em 0 0; font-size: .88em; color: var(--tl-soft, #4a4a4a); }
/* חיווי נראה, ולא רק השבתה דרך ה-SDK: גולש שלוחץ על כפתור שנראה רגיל
   ולא קורה כלום מניח שהאתר שבור. */
.atl__paypal { margin-top: 1.2em; max-width: 420px; }
.atl__paypal.is-locked { pointer-events: none; opacity: .4; }
a.atl__btn { text-decoration: none; display: inline-block; }

/* ---------- שורת הפעולות: ההתקדמות תמיד משמאל, החזרה מימינה ---------- */
.atl__actions { display: flex; justify-content: space-between; align-items: center; gap: .6em; flex-wrap: wrap; }
.atl__actions-side { display: flex; align-items: center; gap: .5em; }
.atl__btn--ghost {
	background: transparent;
	color: var(--tl-text, #3a3a3a);
	border: 1px solid var(--tl-border, #ddd);
	font-weight: 600;
}
.atl__btn--ghost:hover { background: var(--tl-tint, #f4f2f2); }

/* ---------- שער התשלום: השדה והכפתורים באותו רוחב ---------- */
.atl__paybox { max-width: 420px; }
.atl__paybox .atl__text { width: 100%; max-width: none; }
.atl__paybox .atl__paypal { max-width: none; }

/* ---------- ספינר קטן לצד "בודק את ההקלטה" ---------- */
.atl__spin {
	display: inline-block; width: 1em; height: 1em;
	margin-left: .45em; vertical-align: -.15em;
	border: 2px solid var(--tl-grey, #ecf0f1);
	border-top-color: var(--tl-orange, #fc9835);
	border-radius: 50%;
	animation: atl-spin .8s linear infinite;
}

/* ---------- דף המעקב ---------- */
/* ההמתנה ארוכה וידוע שהיא ארוכה, ולכן לכל הקלטה שובל שלבים משלה
   ומחוון משלה, ולא ספינר אחד שמסתובב מעל כולן. */
/* תכונת hidden מול כלל עם display מפורש: הכלל גובר, והאלמנט
   ממשיך להיראות גם כשהקוד הסתיר אותו. */
.atl [hidden] { display: none !important; }

.atl--track { max-width: 760px; }
.atl__track-head { font-weight: 700; font-size: 1.15em; margin: 0 0 .15em; }
.atl__track-loading { display: flex; align-items: center; gap: .5em; color: var(--tl-soft, #4a4a4a); }
.atl__track-order { margin: .1em 0 1.3em; font-size: .95em; color: var(--tl-soft, #4a4a4a); }

.atl__overall { margin-bottom: 1.7em; }
.atl__overall-text { font-weight: 700; margin: 0 0 .55em; }
.atl--track .atl__bar { flex: none; width: 100%; height: 10px; border-radius: 5px; }
.atl--track .atl__bar-fill { transition: width .6s ease; }
.atl--track.is-done .atl__bar-fill { background: var(--tl-green, #2e9e5b); }

.atl__track-list { list-style: none; margin: 0; padding: 0; }
.atl__card {
	border: 1px solid var(--tl-border, #ddd);
	border-radius: var(--tl-radius, 4px);
	background: #fff;
	padding: 1em 1.1em 1.1em;
	margin-bottom: .85em;
}
.atl__card.is-done { border-color: var(--tl-green, #2e9e5b); }
.atl__card.is-error { border-color: #b32d2e; }
.atl__card-head { display: flex; align-items: baseline; gap: .6em; margin-bottom: 1em; }
.atl__card-name { flex: 1 1 auto; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.atl__card-min { flex: 0 0 auto; font-size: .88em; color: var(--tl-soft, #4a4a4a); }
.atl__card-stage { margin: .65em 0 0; font-size: .92em; color: var(--tl-soft, #4a4a4a); }
.atl__card.is-error .atl__card-stage { color: #b32d2e; }

.atl__steps { list-style: none; display: flex; margin: 0 0 .95em; padding: 0; }
.atl__step-dot {
	flex: 1 1 0; position: relative; text-align: center;
	font-size: .8em; line-height: 1.3; color: var(--tl-soft, #4a4a4a);
}
/* הקו שמחבר כל סמן לסמן שלאחריו. בכיוון ימין לשמאל הבא נמצא לשמאלו. */
.atl__step-dot::before {
	content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 2px;
	background: var(--tl-grey, #ecf0f1);
}
.atl__step-dot:last-child::before { display: none; }
.atl__step-mark {
	display: block; position: relative; z-index: 1;
	width: 14px; height: 14px; margin: 0 auto .4em;
	border: 2px solid var(--tl-grey, #ecf0f1); border-radius: 50%;
	background: #fff;
}
.atl__step-dot.is-done .atl__step-mark,
.atl__card.is-done .atl__step-mark {
	background: var(--tl-orange, #fc9835); border-color: var(--tl-orange, #fc9835);
}
.atl__card.is-done .atl__step-mark { background: var(--tl-green, #2e9e5b); border-color: var(--tl-green, #2e9e5b); }
.atl__step-dot.is-now .atl__step-mark {
	border-color: var(--tl-orange, #fc9835);
	animation: atl-pulse 1.8s ease-in-out infinite;
}
.atl__step-dot.is-done,
.atl__step-dot.is-now { color: var(--tl-text, #3a3a3a); }
.atl__step-dot.is-now { font-weight: 700; }
@keyframes atl-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(252, 152, 53, .45); }
	50%      { box-shadow: 0 0 0 7px rgba(252, 152, 53, 0); }
}

.atl__card-dl { display: flex; flex-wrap: wrap; gap: .5em; margin: 1em 0 0; }
.atl__dl { padding: .5em 1.3em; font-size: .92em; text-decoration: none; }

.atl__track-notes { margin-top: 1.7em; font-size: .95em; color: var(--tl-soft, #4a4a4a); }
.atl__track-notes p { margin: .45em 0; }

@media (max-width: 480px) {
	.atl__step-label { font-size: .92em; }
	.atl__card-head { flex-wrap: wrap; }
}

/* מחוון מלא בצבע ההתקדמות על קובץ שנפל קורא "הושלם". הצבע הוא חלק
   מהמסר, ולכן הוא נגזר ממצב הכרטיס. */
.atl__card.is-done .atl__bar-fill { background: var(--tl-green, #2e9e5b); }
.atl__card.is-error .atl__bar-fill { background: #b32d2e; }
