/* Plamore PWA: شريط التثبيت، زر الجرس، لوحة الإشعارات. ألوان الهوية: #00796B و#343c40 */
:root { --pp-brand:#00796B; --pp-ink:#1f2427; --pp-muted:#5b656a; --pp-line:#e4e8e7; --pp-dark:#343c40; }
.plamore-install, .plamore-sheet, .plamore-fab, .plamore-toast, .plamore-notify-btn, .plamore-order-follow {
  font-family: "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* الجرس: يمين/يسار حسب اتجاه الصفحة، وفوق شريط الجوال السفلي للقالب */
.plamore-fab {
  position: fixed; z-index: 9990; inset-inline-start: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--pp-line); background: #fff; color: var(--pp-dark);
  box-shadow: 0 6px 18px rgba(0,0,0,.12); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.plamore-fab.is-on::after { content:""; position:absolute; top:9px; inset-inline-end:10px; width:9px; height:9px; border-radius:50%; background:var(--pp-brand); border:2px solid #fff; }
@media (max-width: 991px) { .plamore-fab { bottom: calc(78px + env(safe-area-inset-bottom)); width: 42px; height: 42px; } }

.plamore-bell { display:inline-block; width:20px; height:20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6V11a7 7 0 0 0-5.5-6.84V3.5a1.5 1.5 0 0 0-3 0v.66A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6V11a7 7 0 0 0-5.5-6.84V3.5a1.5 1.5 0 0 0-3 0v.66A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* شريط التثبيت */
.plamore-install {
  position: fixed; z-index: 9995; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: #fff; color: var(--pp-ink);
  border: 1px solid var(--pp-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.16);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1); max-width: 560px; margin: 0 auto;
}
.plamore-install.show { transform: none; }
@media (max-width: 991px) { .plamore-install { bottom: calc(74px + env(safe-area-inset-bottom)); } }
.plamore-install img { border-radius: 10px; flex: 0 0 40px; }
.plamore-install__t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.plamore-install__t b { font-size: 15px; }
.plamore-install__t small { font-size: 12.5px; color: var(--pp-muted); }
.plamore-install__x { flex: 0 0 36px; height: 36px; border: 0; background: transparent; font-size: 24px; color: var(--pp-muted); cursor: pointer; padding: 0; }

/* أزرار */
.plamore-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.plamore-btn--primary { background: var(--pp-brand); color: #fff; }
.plamore-btn--ghost { background: transparent; color: var(--pp-muted); }
.plamore-btn[disabled] { opacity: .6; }

/* لوحة الإعدادات: ورقة سفلية على الجوال، نافذة في الوسط على الحاسوب */
.plamore-sheet { position: fixed; inset: 0; z-index: 99999; pointer-events: none; }
.plamore-sheet__backdrop { position: absolute; inset: 0; background: rgba(20,24,26,.45); opacity: 0; transition: opacity .25s; }
.plamore-sheet__box {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; color: var(--pp-ink);
  border-radius: 20px 20px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1); max-height: 88vh; overflow: auto;
}
.plamore-sheet.open { pointer-events: auto; }
.plamore-sheet.open .plamore-sheet__backdrop { opacity: 1; }
.plamore-sheet.open .plamore-sheet__box { transform: none; }
@media (min-width: 768px) { .plamore-sheet__box { bottom: auto; top: 50%; border-radius: 20px; transform: translateY(-40%) scale(.98); opacity: 0; } .plamore-sheet.open .plamore-sheet__box { transform: translateY(-50%); opacity: 1; } }
.plamore-sheet__x { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 26px; color: var(--pp-muted); cursor: pointer; }
.plamore-sheet h3 { margin: 0 0 6px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.plamore-sheet h3 small { font-size: 13px; color: var(--pp-muted); font-weight: 400; }
.plamore-sheet__lead { margin: 0 0 14px; color: var(--pp-muted); font-size: 14px; }
.plamore-sheet__note { margin: 10px 0 0; font-size: 12.5px; color: var(--pp-muted); text-align: center; }
.plamore-sheet__status { min-height: 18px; margin: 6px 0 10px; font-size: 13px; color: #9a3412; }
.plamore-sheet .plamore-btn { width: 100%; margin-top: 6px; }

.plamore-switch { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--pp-line); cursor: pointer; }
.plamore-switch input { position: absolute; opacity: 0; pointer-events: none; }
.plamore-switch__ui { flex: 0 0 46px; height: 28px; border-radius: 99px; background: #cfd6d4; position: relative; transition: background .2s; }
.plamore-switch__ui::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.plamore-switch input:checked + .plamore-switch__ui { background: var(--pp-brand); }
.plamore-switch input:checked + .plamore-switch__ui::after { inset-inline-start: 21px; }
.plamore-switch input:focus-visible + .plamore-switch__ui { outline: 2px solid var(--pp-brand); outline-offset: 2px; }
.plamore-switch__txt { display: flex; flex-direction: column; line-height: 1.35; }
.plamore-switch__txt b { font-size: 15px; }
.plamore-switch__txt small { font-size: 12.5px; color: var(--pp-muted); }

/* «أعلمني عند التوفر» داخل رسالة نفاد المخزون */
.plamore-oos-notice { flex-wrap: wrap; }
.plamore-notify-btn {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--pp-brand); background: #fff; color: var(--pp-brand); font-weight: 700; font-size: 14px; cursor: pointer;
}
.plamore-notify-btn small { font-weight: 400; opacity: .8; }
.plamore-notify-btn.is-on { background: var(--pp-brand); color: #fff; }
@media (max-width: 600px) { .plamore-notify-btn { width: 100%; justify-content: center; margin-top: 4px; } }

/* صفحة الشكر */
.plamore-order-follow { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin: 0 0 22px; padding: 16px; border-radius: 12px; border: 1px solid var(--pp-line); border-inline-start: 4px solid var(--pp-brand); background: #f5f7f6; }
.plamore-order-follow div { display: flex; flex-direction: column; }
.plamore-order-follow span { font-size: 13px; color: var(--pp-muted); }
.plamore-order-follow.is-on .button { background: var(--pp-brand) !important; color: #fff !important; }

.plamore-toast { position: fixed; z-index: 100000; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--pp-dark); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 22px rgba(0,0,0,.2); transition: .25s; max-width: calc(100vw - 32px); text-align: center; }
.plamore-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { .plamore-install, .plamore-sheet__box, .plamore-sheet__backdrop, .plamore-toast { transition: none; } }
