/* Smart Ad Manager — Frontend Styles v3.0 */

/* ── Side Panels ────────────────────────────────────────── */
.sam-side {
  position: fixed;
  top: 0;
  height: 80vh;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.sam-side-left  { left: 0; border-radius: 0 8px 8px 0; }
.sam-side-right { right: 0; border-radius: 8px 0 0 8px; }


.sam-side-inner {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sam-side-inner img,
.sam-side-inner video,
.sam-side-inner iframe {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-height: 80%;
}

/* Close button */
.sam-side-close {
  position: absolute;
  top: 6px;
  z-index: 2;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s;
}
.sam-side-left  .sam-side-close { right: 6px; }
.sam-side-right .sam-side-close { left:  6px; }
.sam-side-close:hover { background: rgba(0,0,0,.85); }

/* Restore buttons */
.sam-restore {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9991;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 22px;
  height: 50px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.sam-restore:hover      { background: rgba(0,0,0,.9); }
.sam-restore-left       { left: 0;  border-radius: 0 4px 4px 0; }
.sam-restore-right      { right: 0; border-radius: 4px 0 0 4px; }

/* ── Bottom Bar ─────────────────────────────────────────── */
.sam-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9995;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: #e2e8f0 !important;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Arabic', sans-serif;
  direction: rtl;
  flex-wrap: wrap;
  min-height: 64px;
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
}

/* ── إصلاح لون النص: جميع العناصر داخل الشريط ── */
.sam-bar,
.sam-bar *,
.sam-bar span,
.sam-bar div {
  color: #e2e8f0 !important;
}

.sam-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: 18px;
  color: #e2e8f0 !important;
}
.sam-bar-item:last-child { border-left: none; }

/* الروابط داخل الشريط — أبيض مع hover أخضر */
.sam-bar a,
.sam-bar-item a,
.sam-bar-item-link,
.sam-nearby-item a {
  color: #e2e8f0 !important;
  text-decoration: none !important;
  transition: color .2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sam-bar a:hover,
.sam-bar-item a:hover,
.sam-bar-item-link:hover,
.sam-nearby-item a:hover {
  color: #34d399 !important;
  text-decoration: none !important;
}

.sam-bar-icon { font-size: 18px; }

.sam-bar-btn {
  background: rgba(255,255,255,.1);
  color: #94a3b8 !important;
  border: none;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: auto;
  flex-shrink: 0;
  transition: background .2s;
}
.sam-bar-btn:hover { background: rgba(255,255,255,.2); }

.sam-bar-clock {
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: #e2e8f0 !important;
}

.sam-weather-icon { width: 32px; height: 32px; }

.sam-prayer-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 12px;
  color: #e2e8f0 !important;
}
.sam-prayer-next {
  background: #1D9E75;
  color: #fff !important;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 8px;
}

/* الأماكن القريبة — أسماء المواقع */
.sam-nearby-item {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(255,255,255,.07);
  border-radius: 3px;
  font-size: 12px;
  margin-left: 4px;
  color: #e2e8f0 !important;
}

.sam-bar-restore {
  position: fixed;
  z-index: 9996;
  background: rgba(15,23,42,.9);
  color: #e2e8f0 !important;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 14px;
  font-size: 18px;
  cursor: pointer;
  bottom: 0;
  transition: background .2s;
}
.sam-bar-restore:hover           { background: #0f172a; }
.sam-bar-restore-bottom-right    { right: 24px; }
.sam-bar-restore-bottom-left     { left:  24px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sam-side, .sam-restore { display: none !important; }
  .sam-bar { font-size: 11px; gap: 10px; padding: 8px 10px; min-height: 52px; }
  .sam-prayer-item { font-size: 10px; padding: 1px 4px; }
  .sam-bar-clock { font-size: 13px; }
}