/* تنظيم الصورة المرجعية في Downloader فقط. */
body[data-visual=reference] .container { width: min(var(--reference-content), calc(100% - 64px)); }
body[data-visual=reference] .tool-page { padding-block: 16px 10px; }
.reference-header { height: 62px; background: #001223f2; border-bottom: 1px solid #086b98; }
.reference-header .header-content { width: min(1260px, calc(100% - 32px)); height: 62px; min-height: 62px; padding: 0; gap: 20px; direction: ltr; flex-wrap: nowrap; }
.reference-header .brand { gap: 0; }
.reference-header .brand img { width: 60px; height: 60px; object-fit: contain; }
.reference-header .brand-text { font: 700 26px/1.1 "SAT OTT Inter", Arial, sans-serif; letter-spacing: -.7px; }
.reference-header .brand-text strong { font-weight: 500; color: #20cdf2; }
.reference-header .main-nav { flex-basis: auto; flex-wrap: nowrap; order: 0; direction: rtl; gap: 8px; }
.reference-header .nav-link, .reference-other-tools > summary { min-height: 34px; padding: 7px 9px; border-radius: 25px; font-size: 11px; color: #cbdcf0; white-space: nowrap; }
.reference-header .nav-link.is-active { background: #063c6b; box-shadow: none; color: #55ddff; }
.reference-header-tools { display: flex; gap: 10px; direction: ltr; }
.reference-icon-button, .reference-header .language-toggle { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 50%; background: #093a63; color: #7fbff3; font-size: 19px; }
.reference-header .language-toggle { background: transparent; margin: 0; }
.reference-header .nav-toggle { padding: 6px 10px; min-width: 40px; min-height: 40px; margin: 0; }
.reference-other-tools { position: relative; }
.reference-other-tools > summary { cursor: pointer; list-style: none; }
.reference-other-tools > summary::-webkit-details-marker { display: none; }
.reference-other-tools > div { display: grid; position: absolute; z-index: 20; top: calc(100% + 10px); inset-inline-start: 0; width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.reference-other-tools a { min-height: 44px; padding: 8px; font-size: 13px; direction: ltr; }
.reference-hero { max-width: none; text-align: center; margin: 0 0 4px; }
.reference-hero h1 { display: flex; align-items: center; justify-content: center; gap: 12px; direction: ltr; margin: 0; color: #27d4ee; font-size: 38px; font-weight: 800; letter-spacing: -.5px; }
.reference-hero h1 img { width: 60px; height: 60px; object-fit: contain; }
.reference-hero h1 em { color: #ffe068; font-style: normal; }
.reference-hero p { max-width: none; margin: -1px 0 0; color: #94ccf4; font-size: 16px; line-height: 1.6; }
body[data-visual=reference] .workspace-panel { background: #001425e8; border: 1px solid #075982; border-radius: 11px; box-shadow: none; margin-bottom: 16px; padding: 14px 16px; }
.downloader-search { position: relative; padding: 14px 18px !important; }
.search-mode { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; border: 0; margin: 0 0 8px; padding: 0; }
.search-mode label { display: flex; align-items: center; gap: 9px; min-height: 28px; color: #cbdcf0; font-size: 14px; cursor: pointer; }
.search-mode input { width: 17px; height: 17px; min-height: 17px; margin: 0; accent-color: #23daf4; }
.search-mode label:has(input:checked) { color: #22daf2; }
.reference-search-row { display: flex; align-items: stretch; gap: 12px; }
.reference-search-row .btn { min-width: 108px; min-height: 40px; padding: 7px 15px; border-radius: 7px; font-size: 14px; background: #20c8f1; color: #00182a; border-color: #18d5f2; box-shadow: var(--reference-shadow); }
.reference-search-input { display: flex; flex: 1; min-width: 0; position: relative; }
.reference-search-input input { min-height: 40px; height: 40px; padding: 7px 13px 7px 44px; background: #c1d9e7; border: 1px solid #b8d5ed; border-radius: 7px; box-shadow: inset 0 0 3px #fff8; font-size: 14px; color: #133e65; }
.reference-search-input input::placeholder { color: #466e96; }
.reference-search-input > .ref-icon { position: absolute; left: 15px; top: 12px; color: #183f65; pointer-events: none; }
html[dir=ltr] .reference-search-input input { padding-inline: 13px 44px; }
html[dir=ltr] .reference-search-input > .ref-icon { left: auto; right: 15px; }
.downloader-search .category-shortcuts { justify-content: center; gap: 8px; margin-top: 13px; }
.downloader-search .category-shortcuts button { min-height: 32px; padding: 4px 16px; font-size: 12px; border-radius: 22px; border-color: #066b9f; color: #e4efff; background: #063053; box-shadow: inset 0 0 6px #001426; }
.downloader-search .category-shortcuts button[aria-pressed=true] { background: #008afa; border-color: #03a3f9; color: #001525; box-shadow: 0 0 10px #008cff20; font-weight: 700; }
.search-options { position: absolute; inset-block-start: 8px; inset-inline-end: 14px; margin: 0; font-size: 11px; color: var(--muted); }
.search-options[open] { position: static; margin-top: 10px; }
.search-options:not([open]) > summary > span[data-ar] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.search-options > summary { width: fit-content; display: flex; align-items: center; gap: 6px; min-height: 24px; cursor: pointer; }
.search-advanced { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding-block: 12px 3px; }
.search-advanced .form-field { flex: 1; min-width: 150px; }
.search-advanced .btn { min-height: 44px; font-size: 12px; }
#category-status:empty { display: none; }
.reference-section-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 10px; }
.reference-section-head h2, .downloader-feedback > summary { display: flex; align-items: center; gap: 12px; font-size: 18px; line-height: 1.5; color: #1edcf2; font-weight: 700; }
.reference-section-head h2 > .ref-icon { font-size: 20px; }
.reference-section-head p, .section-description { margin: 2px 0 0; font-size: 11px; line-height: 1.6; color: #8eb2d6; }
.reference-count { flex-shrink: 0; padding: 4px 12px; border: 1px solid #183b56; border-radius: 6px; background: #112d45; font-size: 12px; color: #f5cf43; }
#catalog-state:empty { display: none; }
#favorite-state:empty { display: none; }
#catalog-state { margin-block: 12px; color: #a4c1e0; font-size: 13px; }
.downloader-results { max-height: 400px; overflow-y: auto; scrollbar-gutter: stable; border-radius: 7px; }
.reference-catalog { display: table; width: 100%; table-layout: fixed; border: 1px solid #0a3856; border-radius: 7px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.reference-catalog .number-column { width: 4%; }
.reference-catalog .name-column { width: 30%; }
.reference-catalog .value-column { width: 37%; }
.reference-catalog .action-column { width: 21%; }
.reference-catalog .favorite-column { width: 8%; }
.reference-catalog thead th { position: sticky; top: 0; z-index: 1; height: 33px; padding: 6px 8px; background: #08243d; border-bottom: 1px solid #214e6a; color: #21d9f5; font-size: 12px; text-align: center; }
.reference-catalog tbody th, .reference-catalog td { height: 37px; padding: 4px 8px; border: 0; border-bottom: 1px solid #173f59; border-inline-end: 1px solid #0a2c45; vertical-align: middle; text-align: center; overflow-wrap: anywhere; }
.reference-catalog tr:last-child th, .reference-catalog tr:last-child td { border-bottom: 0; }
.reference-catalog tbody tr:nth-child(even) { background: #021c2f66; }
.reference-catalog .row-name { font: 700 14px/1.5 "SAT OTT Inter", Tahoma, Arial, sans-serif; }
.reference-catalog .row-name-cell { position: relative; }
.reference-catalog .row-category { display: none; }
.reference-catalog .row-value-cell::before { display: none; }
.reference-catalog .table-code { font: 800 16px/1.5 "SAT OTT Inter", Tahoma, Arial, sans-serif; color: #59f05a; text-align: center; white-space: pre-wrap; }
.reference-catalog .row-actions { display: flex; flex-wrap: nowrap; justify-content: center; gap: 10px; direction: rtl; }
.reference-catalog .row-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 27px; min-width: 0; margin: 0; padding: 3px 12px; border-radius: 5px; border: 1px solid #54dfac; background: #09c58c; color: #001b20; font-size: 11px; font-weight: 700; line-height: 1.5; box-shadow: var(--reference-shadow); }
.reference-catalog .url-button { background: #ffd144; border-color: #ffe073; color: #211900; }
.reference-catalog .copy-button .ref-icon { color: #e6fff3; }
.reference-catalog .favorite-button, .reference-catalog .remove-favorite { min-width: 30px; min-height: 28px; border: 0; padding: 3px; margin: 0; border-radius: 5px; background: transparent; color: #9ccbee; box-shadow: none; font-size: 17px; }
.reference-catalog .favorite-button .ref-icon { font-family: "SAT OTT Icons Regular"; font-weight: 400; }
.reference-catalog .favorite-button[aria-pressed=true] { color: #ff5669; background: transparent; }
.reference-catalog .favorite-button[aria-pressed=true] .ref-icon { font-family: "SAT OTT Icons"; font-weight: 900; }
.reference-catalog .remove-favorite { color: #ff5b60; }
.reference-catalog .row-report { position: absolute; inset-inline-start: 1px; top: 4px; border: 0; background: var(--panel); padding: 4px; opacity: 0; font-size: 12px; color: var(--amber); }
.reference-catalog tr:hover .row-report, .reference-catalog tr:focus-within .row-report { opacity: 1; }
.reference-results .load-actions { margin: 10px 0 0; }
.reference-results .load-actions .btn { min-height: 35px; font-size: 12px; padding: 5px 14px; }
.reference-favorites .reference-section-head h2 { color: #ffd340; }
.reference-favorites .hint { margin: 8px 0 0; }
.downloader-feedback { width: 100%; max-width: none; }
.downloader-feedback > summary { list-style: none; padding: 0; cursor: pointer; min-height: 27px; }
.downloader-feedback > summary::-webkit-details-marker { display: none; }
.downloader-feedback > summary .icon-whatsapp { color: #12d98e; }
.downloader-feedback[open] > summary { margin-bottom: 0; }
.downloader-feedback .section-description { margin: 4px 0 10px; padding-inline-start: 32px; }
.downloader-feedback .two-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.downloader-feedback .mini-panel { padding: 10px 16px; gap: 7px; border: 1px solid #075a86; border-radius: 7px; background: #09233bcc; }
.downloader-feedback .mini-panel h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; color: #21d9f4; margin: 0; }
.downloader-feedback #code-report-form h2 { color: #ffd53f; }
.feedback-app-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.downloader-feedback .form-field { font-size: 11px; gap: 2px; color: #d7e7fa; font-weight: 400; }
.downloader-feedback input, .downloader-feedback textarea { min-height: 32px; padding: 5px 10px; border: 1px solid #23567e; border-radius: 6px; background: #102c47; font-size: 12px; line-height: 1.7; }
.downloader-feedback textarea { min-height: 42px; resize: vertical; }
.downloader-feedback .feedback-submit { width: 100%; align-self: stretch; min-height: 35px; margin-top: auto; padding: 6px 10px; font-size: 12px; border-radius: 6px; background: #21bafa; color: #00192a; box-shadow: var(--reference-shadow); }
.downloader-feedback #code-report-form .feedback-submit { background: #ffb51f; border-color: #f6ba45; color: #171000; }
.downloader-feedback > .form-actions { margin: 10px 0 0; }
.downloader-feedback #clear-feedback { padding: 4px 8px; min-height: 30px; font-size: 11px; background: transparent; border-color: transparent; color: #92b6d8; }
#feedback-status:empty { display: none; }
.reference-faq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.downloader-about .reference-faq-grid > details { border: 1px solid #095b85; border-radius: 6px; padding: 8px 12px; background: #08243ac4; }
.downloader-about .reference-faq-grid summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; min-height: 28px; font-size: 12px; color: #78c9ff; font-weight: 700; cursor: pointer; }
.downloader-about .reference-faq-grid p { margin-top: 4px; color: #a7c9e9; font-size: 11px; line-height: 1.7; }
.downloader-about .legacy-intro { margin-top: 12px; padding-top: 8px; border-top: 1px solid #163b57; }
.legacy-intro > summary { cursor: pointer; color: #8db9d9; font-size: 12px; min-height: 30px; }
.legacy-intro h2, .legacy-intro h3 { font-size: 17px; margin: 18px 0 8px; }
.legacy-intro p, .legacy-intro li { color: #a7c9e9; font-size: 13px; line-height: 1.9; }
.legacy-intro details { border-top: 1px solid var(--line-soft); padding-block: 10px; }
.legacy-intro details summary { color: var(--accent); cursor: pointer; }
.reference-footer { padding-block: 8px; background: #001122d9; border-top: 1px solid #075983; font-size: 10px; }
.reference-footer .footer-content { gap: 12px; }
.reference-footer .icon-heart { margin-inline-start: 8px; color: #ff5579; }
.reference-footer a { color: #20c8fb; }
@media (max-width: 1000px) {
 .reference-header .header-content { gap: 10px; }
 .reference-header .brand-text { font-size: 23px; }
 .reference-header .main-nav { gap: 2px; }
 .reference-header .nav-link, .reference-other-tools > summary { padding-inline: 7px; font-size: 10px; }
}
@media (max-width: 800px) {
 body[data-visual=reference] .container { width: calc(100% - 32px); }
 .reference-header .header-content { width: calc(100% - 20px); }
 .reference-header .brand-text { font-size: 21px; }
 .reference-header .brand img { width: 48px; height: 48px; }
 .reference-header .nav-toggle { display: block; margin-inline-start: auto; }
 .reference-header .main-nav { display: none; position: absolute; inset: 62px 0 auto; padding: 12px 16px; background: #001a30; border-bottom: 1px solid #08628c; max-height: calc(100dvh - 62px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 2px; }
 .reference-header .main-nav.is-open { display: flex; }
 .reference-header .nav-link, .reference-other-tools > summary { min-height: 44px; padding: 9px 12px; font-size: 13px; }
 .reference-other-tools > div { position: static; width: 100%; margin-block: 4px; }
 .reference-catalog .number-column { width: 6%; } .reference-catalog .name-column { width: 29%; }
 .reference-catalog .value-column { width: 27%; } .reference-catalog .action-column { width: 27%; } .reference-catalog .favorite-column { width: 11%; }
 .reference-catalog { display: table; table-layout: fixed; }
 .reference-catalog thead { position: static; width: auto; height: auto; clip-path: none; overflow: visible; }
 .reference-catalog tbody { display: table-row-group; }
 .reference-catalog tbody tr { display: table-row; }
 .reference-catalog tbody th, .reference-catalog td { display: table-cell; padding: 5px; }
 .reference-catalog .row-actions { flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 600px) {
 .reference-header .header-content { gap: 6px; } .reference-header .brand-text { font-size: 18px; }
 .reference-header-tools { gap: 3px; }
 .reference-icon-button, .reference-header .language-toggle { min-width: 36px; min-height: 44px; background: transparent; }
 .reference-hero h1 { font-size: clamp(23px, 6vw, 31px); gap: 3px; letter-spacing: -.5px; }
 .reference-hero h1 img { width: 45px; height: 48px; } .reference-hero p { font-size: 12px; margin-top: 4px; }
 body[data-visual=reference] .workspace-panel { padding: 12px 10px; border-radius: 9px; }
 .downloader-search { padding: 12px 10px !important; }
 .search-mode { gap: 22px; margin-bottom: 10px; } .search-mode label { font-size: 12px; min-height: 36px; }
 .reference-search-row { gap: 7px; } .reference-search-row .btn { min-width: 76px; min-height: 44px; padding-inline: 10px; font-size: 12px; }
 .reference-search-input input { font-size: 16px; min-height: 44px; height: 44px; padding-inline: 10px 30px; }
 .reference-search-input > .ref-icon { left: 10px; top: 15px; font-size: 13px; }
 .downloader-search .category-shortcuts { gap: 6px; } .downloader-search .category-shortcuts button { min-height: 44px; padding-inline: 13px; font-size: 11px; }
 .search-options > summary { min-height: 44px; min-width: 44px; justify-content: center; }
 .reference-section-head { gap: 6px; margin-bottom: 9px; } .reference-section-head h2, .downloader-feedback > summary { font-size: 15px; gap: 7px; }
 .reference-section-head p { font-size: 10px; } .reference-count { padding: 4px 6px; font-size: 10px; }
 .reference-catalog thead th { padding: 5px 2px; font-size: 10px; line-height: 1.5; }
 .reference-catalog .number-column { width: 6%; } .reference-catalog .name-column { width: 30%; }
 .reference-catalog .value-column { width: 24%; } .reference-catalog .action-column { width: 24%; } .reference-catalog .favorite-column { width: 16%; }
 .reference-catalog .row-name { font-size: 11px; } .reference-catalog .table-code { font-size: 12px; } .reference-catalog .row-number { font-size: 10px; }
 .reference-catalog tbody th, .reference-catalog td { padding: 6px 3px; }
 .reference-catalog .row-button { min-height: 44px; min-width: 44px; padding: 4px; font-size: 10px; gap: 4px; }
 .reference-catalog .favorite-button, .reference-catalog .remove-favorite { min-width: 44px; min-height: 44px; font-size: 17px; }
 .reference-catalog .row-report { position: static; opacity: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; margin-top: 3px; }
 .reference-catalog .copy-button .button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .downloader-feedback .two-panels, .reference-faq-grid { grid-template-columns: minmax(0, 1fr); }
 .downloader-feedback .mini-panel { padding: 12px; gap: 10px; }
 .downloader-feedback input, .downloader-feedback textarea { min-height: 44px; font-size: 16px; }
 .downloader-feedback textarea { min-height: 76px; } .downloader-feedback .feedback-submit { min-height: 44px; }
 .feedback-app-fields { grid-template-columns: minmax(0, 1fr); }
 .downloader-feedback .section-description { padding-inline-start: 0; font-size: 11px; }
 .reference-footer .footer-content { align-items: center; text-align: center; }
}
@media (max-width: 360px) { .reference-header .brand-text { font-size: 16px; } .reference-header .brand img { width: 36px; height: 44px; } .reference-header .header-content { gap: 3px; } .reference-header-tools { gap: 0; } .reference-header .language-toggle, .reference-icon-button { min-width: 32px; width: 32px; } }
@media (prefers-reduced-motion: no-preference) { .reference-catalog .row-button { transition: filter .12s ease; } .reference-catalog .row-button:hover { filter: brightness(1.1); } }
@media print { body[data-visual=reference] { background: #fff; color: #000; } .downloader-results { max-height: none; overflow: visible; } .reference-header, .reference-catalog .row-report { display: none; } }

/* اختصارات Downloader أسفل شريط البحث؛ الإجراءات في منتصف عمودها باللغتين. */
html[data-theme] body[data-catalog=apps][data-design=master] .downloader-search .category-shortcuts {
 display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin:12px 0 0;width:100%;
}
html[data-theme] body[data-catalog=apps][data-design=master] .downloader-search .category-shortcuts button {
 width:100%;min-width:0;padding-inline:8px;
}
html[data-theme] body[data-catalog=apps][data-design=master] .catalog-table .row-actions {
 justify-content:center;gap:12px;padding-inline:6px;
}
@media(max-width:780px){
 html[data-theme] body[data-catalog=apps][data-design=master] .downloader-search .category-shortcuts {
  grid-template-columns:repeat(4,minmax(0,1fr));
 }
}
@media(max-width:600px){
 html[data-theme] body[data-catalog=apps][data-design=master] .downloader-search .category-shortcuts {gap:6px;}
 html[data-theme] body[data-catalog=apps][data-design=master] .downloader-search .category-shortcuts button {
  min-height:44px;font-size:11px;padding-inline:6px;
 }
 html[data-theme] body[data-catalog=apps][data-design=master] .catalog-table .row-actions {
  display:grid;grid-template-columns:repeat(2,minmax(44px,1fr));gap:8px;padding-inline:2px;
 }
}
