/* === SHUNYA SHATABDI v4.2 — PATCHES CSS === */

/* ═══ AD SLOTS ═══ */
.ss-ad-slot {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.ss-ad-label {
  font-size: 10px;
  color: #999;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}
.ss-ad-slot img { transition: transform .2s; }
.ss-ad-slot img:hover { transform: scale(1.01); }
[data-theme="dark"] .ss-ad-label { color: #555; }
@media(max-width:768px){
  .ss-ad-slot { margin: 12px auto !important; max-width: 100% !important; }
}

/* ═══ POPUP AD ═══ */
.ss-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.65);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ssFadeIn .3s ease;
}
@keyframes ssFadeIn { from { opacity: 0 } to { opacity: 1 } }
.ss-popup-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  position: relative;
  box-shadow: 0 25px 80px rgba(0,0,0,.4);
  animation: ssPopIn .3s ease;
  max-width: 90vw;
  max-height: 85vh;
  overflow: auto;
}
@keyframes ssPopIn { from { transform: scale(.85) translateY(20px); opacity: 0 } to { transform: scale(1) translateY(0); opacity: 1 } }
.ss-popup-close {
  position: absolute;
  top: -8px; right: -8px;
  width: 36px; height: 36px;
  background: #E53935;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(229,57,53,.4);
  transition: transform .2s;
  z-index: 1;
}
.ss-popup-close:hover { transform: scale(1.15); background: #c62828; }
[data-theme="dark"] .ss-popup-box { background: #1a1a2e; color: #eee; }

/* ═══ TOGGLE SWITCH ═══ */
.ss-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.ss-switch input { opacity: 0; width: 0; height: 0; }
.ss-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 28px;
  transition: .3s;
}
.ss-slider::before {
  content: '';
  position: absolute;
  height: 22px; width: 22px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.ss-switch input:checked + .ss-slider { background: linear-gradient(135deg, #4CAF50, #66BB6A); }
.ss-switch input:checked + .ss-slider::before { transform: translateX(24px); }

/* ═══ EDITOR TOOLBAR ═══ */
.editor-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.etb {
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #333;
  transition: .2s;
  font-family: inherit;
}
.etb:hover { background: #E53935; color: #fff; border-color: #E53935; }
[data-theme="dark"] .editor-toolbar { background: #161B22; border-color: #30363D; }
[data-theme="dark"] .etb { background: #21262D; border-color: #30363D; color: #ccc; }
[data-theme="dark"] .etb:hover { background: #E53935; color: #fff; }

/* ═══ AD MANAGER ADMIN ═══ */
.ad-slot-editor { transition: border-color .3s; }
.ad-slot-editor label { font-size: 12px; font-weight: 700; color: #555; }
.ad-slot-editor input,
.ad-slot-editor select,
.ad-slot-editor textarea {
  transition: border-color .2s;
}
.ad-slot-editor input:focus,
.ad-slot-editor select:focus,
.ad-slot-editor textarea:focus {
  border-color: #E53935 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}
[data-theme="dark"] .ad-slot-editor input,
[data-theme="dark"] .ad-slot-editor select,
[data-theme="dark"] .ad-slot-editor textarea {
  background: #21262D;
  border-color: #30363D !important;
  color: #ccc;
}

/* ═══ MOBILE RESPONSIVE ═══ */
@media(max-width:768px){
  .ad-slot-editor .fr,
  .ad-slot-editor div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .ss-popup-box { padding: 16px; border-radius: 12px; }
  .ss-popup-close { top: -6px; right: -6px; width: 32px; height: 32px; font-size: 14px; }
  .editor-toolbar { padding: 6px 8px; }
  .etb { padding: 3px 8px; font-size: 11px; }
}
