/* راديو الأفندي العائم — الرئيسية فقط (js/site-radio.js) */
.rdo { position: fixed; z-index: 90; left: 16px; bottom: 18px; direction: rtl; font-family: var(--f-body, 'IBM Plex Sans Arabic', sans-serif); color: var(--ink, #1F1A16); }
.rdo * { box-sizing: border-box; }
.rdo button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rdo button:focus-visible, .rdo input:focus-visible { outline: 3px solid var(--or-deep, #B4541C); outline-offset: 2px; }

/* الحبّة المغلقة */
.rdo__btn { display: flex; align-items: center; gap: 10px; max-width: min(260px, calc(100vw - 32px)); min-height: 52px; margin: 0; background: var(--paper, #FCFAF6); border: 1.5px solid var(--or2, #F3A867); border-radius: 999px; padding: 6px 8px 6px 16px; box-shadow: 0 10px 30px -8px rgba(180, 84, 28, .45); text-align: start; transition: transform .2s ease, box-shadow .2s ease; }
.rdo__btn:hover { transform: translateY(-2px); }
.rdo__btn img { width: 52px; height: 40px; object-fit: contain; flex: none; }
.rdo__txt { min-width: 0; display: block; }
.rdo__txt b { display: block; font-size: 14px; line-height: 1.35; color: var(--ink, #1F1A16); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdo__txt small { display: block; font-size: 11px; line-height: 1.35; color: var(--or-deep, #B4541C); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* المعادل الصوتي */
.rdo__eq { display: none; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.rdo__eq i { width: 3px; height: 40%; background: var(--or, #E5802A); border-radius: 2px; }
.rdo.is-playing .rdo__eq { display: flex; }
.rdo.is-playing .rdo__eq i { animation: rdoEq 1s ease-in-out infinite; }
.rdo__eq i:nth-child(2) { animation-delay: -.3s; }
.rdo__eq i:nth-child(3) { animation-delay: -.6s; }
.rdo__eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes rdoEq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .rdo__eq i { animation: none !important; }
  .rdo__eq i:nth-child(1) { height: 40%; } .rdo__eq i:nth-child(2) { height: 90%; } .rdo__eq i:nth-child(3) { height: 60%; } .rdo__eq i:nth-child(4) { height: 80%; }
  .rdo__btn { transition: none; } .rdo__btn:hover { transform: none; }
}

/* اللوحة */
.rdo__panel { position: absolute; bottom: 64px; left: 0; width: 310px; max-width: calc(100vw - 32px); max-height: min(70vh, 560px); display: flex; flex-direction: column; overflow: hidden; z-index: 2; background: var(--paper, #FCFAF6); border: 1px solid #EADCCB; border-radius: 22px; box-shadow: 0 24px 60px -16px rgba(31, 26, 22, .35); }
.rdo__panel[hidden] { display: none; }
.rdo__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.rdo__head, .rdo__now, .rdo__note { flex: none; }
.rdo__head { display: flex; align-items: center; gap: 12px; padding: 10px 14px 8px; background: linear-gradient(180deg, #FBE3CB, #FCFAF6); }
.rdo__head img { width: 60px; height: auto; flex: none; }
.rdo__head b { display: block; font-size: 15px; line-height: 1.4; }
.rdo__head span { display: block; font-size: 12px; line-height: 1.5; color: var(--ink-soft, #5B5048); font-weight: 500; }

.rdo__now { padding: 8px 14px 10px; border-top: 1px solid #F1E6D8; background: #FFF4E8; }
.rdo__now[hidden] { display: none; }
.rdo__title { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.rdo__chname { display: block; font-size: 11.5px; color: var(--ink-soft, #5B5048); margin-bottom: 6px; }
.rdo__bar { position: relative; height: 4px; border-radius: 2px; background: #EADCCB; overflow: hidden; margin-bottom: 8px; }
.rdo__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--or, #E5802A); }
.rdo__ctl { display: flex; align-items: center; gap: 8px; }
.rdo__ib { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid #EADCCB; background: #fff; display: grid; place-items: center; color: var(--or-deep, #B4541C); }
.rdo__ib:disabled { opacity: .35; cursor: default; }
.rdo__ib svg { width: 16px; height: 16px; fill: currentColor; }
.rdo__ib--main { width: 40px; height: 40px; background: var(--or-deep, #B4541C); border-color: var(--or-deep, #B4541C); color: #fff; }
.rdo__vol { flex: 1; min-width: 0; margin-inline-start: 6px; accent-color: var(--or-deep, #B4541C); height: 24px; }

.rdo__ch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; margin: 0; border: 0; border-top: 1px solid #F1E6D8; background: transparent; text-align: start; font-size: 14px; }
.rdo__ch:hover { background: #FFF8F0; }
.rdo__ic { width: 36px; height: 36px; border-radius: 12px; background: #FBE3CB; display: grid; place-items: center; color: var(--or-deep, #B4541C); flex: none; }
.rdo__ic svg { width: 18px; height: 18px; fill: currentColor; }
.rdo__ch > span:nth-child(2) { min-width: 0; flex: 1; font-weight: 600; line-height: 1.4; }
.rdo__ch small { display: block; color: var(--ink-soft, #5B5048); font-size: 11.5px; font-weight: 500; }
.rdo__pl { width: 30px; height: 30px; border-radius: 50%; background: var(--or, #E5802A); color: #fff; display: grid; place-items: center; flex: none; }
.rdo__pl svg { width: 12px; height: 12px; fill: currentColor; }
.rdo__ch.is-on { background: #FFF4E8; }
.rdo__ch.is-on .rdo__ic { background: var(--or, #E5802A); color: #fff; }
.rdo__sep { height: 8px; background: var(--paper2, #F6EFE6); border-top: 1px solid #F1E6D8; }
.rdo__ch--soon { opacity: .55; cursor: default; }
.rdo__ch--soon:hover { background: transparent; }
.rdo__note { margin: 0; padding: 7px 14px 9px; font-size: 11px; line-height: 1.55; color: var(--ink-soft, #5B5048); border-top: 1px solid #F1E6D8; }

/* موبايل: شريط سفلي واحد — الراديو يسارًا و«تواصل معي» يمينًا */
@media (max-width: 760px) {
  .rdo { left: 14px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .rdo__btn { min-height: 48px; padding: 4px 6px 4px 12px; }
  .rdo__btn img { width: 46px; height: 36px; }
  html.has-radio.has-sticky .rdo__btn { width: 150px; }
  html.has-radio.has-sticky .stickycta { inset-inline-end: calc(14px + 150px + 8px); }
  .rdo__panel { bottom: 58px; width: min(330px, calc(100vw - 28px)); }
  .rdo.is-mini:not(.is-open) .rdo__btn { width: 52px; height: 52px; min-height: 0; padding: 0; justify-content: center; gap: 2px; }
  .rdo.is-mini:not(.is-open) .rdo__txt { display: none; }
  .rdo.is-mini:not(.is-open) .rdo__btn img { width: 34px; height: 28px; }
  .rdo.is-mini:not(.is-open).is-playing .rdo__btn img { display: none; }
}

.rdo__ch--sub { padding-block: 8px; border-top: 0; }
.rdo__ch--sub .rdo__ic { background: transparent; height: 20px; }
.rdo__ch--sub > span:nth-child(2) { font-weight: 500; font-size: 12.5px; }
.rdo { transition: opacity .25s ease, transform .25s ease; }
.rdo.is-away:not(.is-open) { opacity: 0; transform: translateY(16px); pointer-events: none; }

/* تصغير الراديو أثناء التشغيل فوق نموذج التواصل */
.rdo.is-tiny:not(.is-open) .rdo__btn { width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; opacity: .92; }
.rdo.is-tiny:not(.is-open) .rdo__txt, .rdo.is-tiny:not(.is-open) .rdo__btn img { display: none; }
@media (min-width: 761px) { .rdo.is-tiny:not(.is-open) .rdo__btn { width: auto; height: auto; padding: 6px 8px 6px 16px; } .rdo.is-tiny:not(.is-open) .rdo__txt, .rdo.is-tiny:not(.is-open) .rdo__btn img { display: block; } }

/* قائمة «تواصل معي» */
.rdo__scrim { position: fixed; inset: 0; z-index: 1; background: rgba(31, 26, 22, .22); }
.rdo__scrim[hidden], .rdo__sheet[hidden] { display: none; }
.rdo__sheet { position: fixed; z-index: 3; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); background: var(--paper, #FCFAF6); border: 1px solid #EADCCB; border-radius: 22px; box-shadow: 0 24px 60px -14px rgba(31, 26, 22, .4); overflow: hidden; }
.rdo__sheet h4 { margin: 0; padding: 16px 18px 4px; font-size: 16px; line-height: 1.5; }
.rdo__sheet p { margin: 0; padding: 0 18px 10px; font-size: 12.5px; color: var(--ink-soft, #5B5048); }
.rdo__opt { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 12px 18px; border: 0; border-top: 1px solid #F1E6D8; background: transparent; text-align: start; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink, #1F1A16); text-decoration: none; }
.rdo__opt:hover:not(:disabled) { background: #FFF8F0; }
.rdo__opt small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-soft, #5B5048); }
.rdo__opt > span:nth-child(2) { flex: 1; min-width: 0; }
.rdo__oi { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; background: #FBE3CB; color: var(--or-deep, #B4541C); flex: none; }
.rdo__opt--wa .rdo__oi { background: #E7F6EC; color: #1F8F4E; }
.rdo__opt--ai .rdo__oi { background: #1F1A16; color: #F3A867; }
.rdo__opt:disabled { opacity: .62; cursor: default; }
.rdo__tag { margin-inline-start: auto; font-style: normal; font-size: 11px; font-weight: 600; background: #F6EFE6; color: var(--or-deep, #B4541C); border-radius: 999px; padding: 4px 10px; flex: none; }
@media (min-width: 761px) {
  .rdo__sheet { inset-inline: auto; right: 16px; left: auto; width: 340px; bottom: 82px; }
  .rdo__scrim { background: transparent; }
}
/* زر «تواصل معي» العائم على الديسكتوب */
@media (min-width: 761px) {
  .stickycta { display: flex; align-items: center; justify-content: center; position: fixed; right: 16px; left: auto; bottom: 18px; z-index: 95; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--or-deep, #B4541C); color: #fff; font: 700 1rem/1 var(--f-body, 'IBM Plex Sans Arabic', sans-serif); text-decoration: none; border: 0; box-shadow: 0 10px 26px -10px rgba(120, 50, 10, .65); transition: transform .28s ease, opacity .28s ease; cursor: pointer; }
  .stickycta[hidden] { display: none; }
  .stickycta.is-dodge { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
}
.rdo__btn { position: relative; z-index: 2; }
html .stickycta { z-index: 95; }
html button.stickycta { border: 0; cursor: pointer; font-family: var(--f-body, "IBM Plex Sans Arabic", sans-serif); }

/* النسخة الإنجليزية: نفس الأماكن (الراديو شمال و«Get in touch» يمين)، والاتجاه والخط إنجليزي */
html[lang="en"] .rdo { direction: ltr; }
html[lang="en"] .rdo__btn { padding: 6px 16px 6px 8px; }
html[lang="en"] button.stickycta { font-family: var(--f-body, 'IBM Plex Sans', sans-serif); }
@media (max-width: 760px) {
  html[lang="en"] .rdo__btn { padding: 4px 12px 4px 6px; }
  html[lang="en"].has-radio.has-sticky .stickycta { inset-inline-end: 14px; inset-inline-start: calc(14px + 150px + 8px); }
}
@media (min-width: 761px) { html[lang="en"] .rdo.is-tiny:not(.is-open) .rdo__btn { padding: 6px 16px 6px 8px; } }
