/* DIIHK cookie consent banner — styled after ahk.de (Piwik PRO look).
   All rules scoped under #diihk-consent / .dc- so nothing leaks into site styles. */

#diihk-consent, #diihk-consent * { box-sizing: border-box; }

/* پوشش تیره پشت پنجره */
.dc-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 33, 45, 0.55);
  display: none;                 /* با JS نمایش داده می‌شود */
  align-items: center; justify-content: center;
  z-index: 99999;
  padding: 20px;
}
.dc-overlay.dc-open { display: flex; }

/* خود پنجره */
.dc-modal {
  background: #ffffff;
  width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  padding: 32px 34px 20px;
  position: relative;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}

/* سطر بالا: انتخاب زبان + دکمه بستن */
.dc-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.dc-lang {
  font-size: 14px; font-weight: bold; color: #222;
  background: transparent; border: none; cursor: pointer; padding: 4px;
}
.dc-close {
  background: none; border: none; font-size: 22px; line-height: 1;
  cursor: pointer; color: #222; padding: 0 4px;
}

.dc-title {
  font-size: 27px; font-weight: bold; margin: 0 0 16px; color: #1a1a1a;
}
.dc-intro { font-size: 15px; line-height: 1.55; color: #333; margin: 0 0 10px; }
.dc-link  { color: #1565c0; text-decoration: none; font-size: 15px; }
.dc-link:hover { text-decoration: underline; }

/* لیست دسته‌ها */
.dc-cats { margin: 22px 0 8px; }
.dc-cat {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 4px; border-top: 1px solid #eee;
}
.dc-cat:last-child { border-bottom: 1px solid #eee; }
.dc-cat-text h3 { margin: 0 0 6px; font-size: 15px; font-weight: bold; }
.dc-cat-text p  { margin: 0; font-size: 13.5px; line-height: 1.5; color: #444; }

/* سوییچ روشن/خاموش (شبیه ahk.de: کادر با ضربدر قرمز وقتی خاموش) */
.dc-switch {
  position: relative; flex: 0 0 auto;
  width: 74px; height: 32px; margin-top: 2px;
  border-radius: 3px; cursor: pointer; border: none;
  display: flex; align-items: center;
  background: #d32f2f;             /* حالت خاموش: قرمز */
  transition: background .2s;
  padding: 0;
}
.dc-switch .dc-knob {
  position: absolute; top: 3px; left: 3px;
  width: 40px; height: 26px; background: #fff; border-radius: 2px;
  transition: transform .2s;
  display:flex; align-items:center; justify-content:center;
}
.dc-switch .dc-mark {
  position: absolute; right: 10px; color:#fff; font-size: 15px; font-weight: bold;
  pointer-events:none;
}
/* حالت روشن: سبز، دسته می‌رود سمت راست، تیک */
.dc-switch.dc-on { background: #43a047; }
.dc-switch.dc-on .dc-knob { transform: translateX(31px); }
.dc-switch.dc-on .dc-mark { right: auto; left: 12px; }

/* دکمه‌ها */
.dc-actions {
  display: flex; gap: 12px; justify-content: center;
  margin: 22px 0 6px; flex-wrap: wrap;
}
.dc-btn {
  font-size: 15px; padding: 12px 22px; border-radius: 4px;
  cursor: pointer; border: 1px solid transparent; font-weight: 500;
}
.dc-btn-primary { background: #1565c0; color: #fff; border-color:#1565c0; }
.dc-btn-primary:hover { background: #0d47a1; }
.dc-btn-secondary { background: #e0e0e0; color: #222; border-color:#d0d0d0; }
.dc-btn-secondary:hover { background: #d0d0d0; }
.dc-reject {
  display: block; margin: 4px auto 8px; text-align: center;
  background: none; border: none; color: #1565c0; font-size: 15px;
  cursor: pointer; width: 100%;
}
.dc-reject:hover { text-decoration: underline; }

.dc-powered {
  text-align: center; font-size: 12px; color: #999;
  border-top: 1px solid #eee; margin-top: 12px; padding-top: 12px;
}
.dc-powered b { color: #666; }

/* دکمه‌ی کوچک برای باز کردن دوباره‌ی تنظیمات (اختیاری) */
.dc-reopen {
  position: fixed; bottom: 18px; left: 18px; z-index: 9999;
  background: #1565c0; color:#fff; border:none; border-radius: 50%;
  width: 46px; height: 46px; font-size: 20px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); display:none;
}

/* راست‌چین برای فارسی */
.dc-modal.dc-rtl { direction: rtl; text-align: right; }
.dc-modal.dc-rtl .dc-cat { flex-direction: row-reverse; }

@media (max-width: 480px) {
  .dc-modal { padding: 22px 18px 16px; }
  .dc-title { font-size: 22px; }
  .dc-actions { flex-direction: column; }
  .dc-btn { width: 100%; }
}
