
/* DAHAB MINI GAMES - UI */

/* جوال فقط: تثبيت المرجع */
#room > .tablebox.footer {
  position: relative;
}

/* السهم فوق الخروج والسمايلات */
.dhg-dock, .dhg-dock * {
  box-sizing: border-box;
}

.dhg-dock {
  position: absolute;
  left: auto !important;
  right: 22px !important;
  top: -17px !important;
  bottom: auto !important;
  z-index: 1500;
  width: 24px;
  height: 19px;
  direction: ltr;
  font-family: Tahoma, Arial, sans-serif;
}

.dhg-arrow {
    display: grid;
    place-items: center;
    width: 24px;
    height: 19px;
    padding: 0;
    border: 1px solid #9e9ba5;
    border-radius: 6px;
    background: linear-gradient(145deg, #353645, #252636);
    box-shadow: 0 2px 5px #0003;
    color: #edd1a2;
    font: bold 17px / 1 Arial, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}
.dhg-arrow span {
  transform: translateY(1px);
}

/* القائمة الصغيرة للأعلى */
.dhg-menu {
  position: absolute;
  left: auto !important;
  right: -17px !important;
  bottom: calc(100% + 7px);
  width: 212px;
  padding: 9px;
  border: 1px solid #514f61;
  border-radius: 12px;
  background: #22232d;
  color: #eaeaf0;
  box-shadow: 0 7px 20px #0004;
  text-align: right;
  font: 12px/1.4 Tahoma, Arial, sans-serif;
}

.dhg-menu[hidden],
.dhg-options[hidden] {
  display: none !important;
}

.dhg-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e4c189;
  font-weight: bold;
  padding: 0 2px 8px;
}

.dhg-heading small {
  font-size: 9px;
  font-weight: normal;
  color: #a9a8b6;
}

/* بطاقة رقم الحظ */
.dhg-tile {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #3a3b4b;
  border-radius: 9px;
  background: #2b2c38;
}

.dhg-play {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: #f5f1ed;
  font: bold 12px Tahoma, Arial, sans-serif;
  text-align: right;
  cursor: pointer;
}

.dhg-symbol {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 24px;
  background: linear-gradient(145deg, #1b4739, #143024);
}

.dhg-symbol b {
  position: absolute;
  bottom: 0;
  font: bold 9px Arial, sans-serif;
  color: #ffe19c;
  text-shadow: 0 1px 2px #000;
}

.dhg-title {
  display: block;
}

.dhg-subtitle {
  display: block;
  margin-top: 2px;
  font: normal 10px Tahoma, sans-serif;
  color: #a7aabc;
}

/* ترس الإعدادات */
.dhg-settings {
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #555b64;
  background: #343843;
  color: #44d4c9;
  font-size: 17px;
  cursor: pointer;
  touch-action: manipulation;
}

.dhg-settings[aria-expanded="true"] {
  border-color: #39c9c4;
}

/* خيارات الأحادي والثنائي والثلاثي */
.dhg-options {
  padding-top: 9px;
}

.dhg-options-label {
  color: #d8c49f;
  margin-bottom: 6px;
  font-size: 11px;
}

.dhg-ranges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  direction: rtl;
}

.dhg-ranges button {
  min-width: 0;
  height: 35px;
  border: 1px solid #454657;
  border-radius: 8px;
  background: #242431;
  color: #f0c88a;
  font: bold 12px Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.dhg-ranges button.is-active {
  border-color: #33d2c7;
  box-shadow: inset 0 0 0 1px #33d2c7;
  background: #263337;
  color: #ffe0aa;
}

.dhg-current {
  margin-top: 7px;
  text-align: center;
  color: #b6becb;
  font-size: 10px;
}


/* DAHAB LUCKY - PUBLIC CARD */

h5.public_message__content.dh-lucky-message {
  margin: 3px 0;
  padding: 0;
}

.dh-lucky-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  width: 125px;
  min-height: 91px;
  padding: 8px;

  background: linear-gradient(
    145deg, #1e2330, #303746
  );
  border: 1px solid #c6a15d;
  border-radius: 9px;

  box-shadow: 0 2px 7px #0002;
  text-align: center;
  direction: rtl;
  font-family: Tahoma, Arial, sans-serif;
}

.dh-lucky-title {
  color: #f6e8c6;
  font-size: 11px;
  font-weight: bold;
}

.dh-lucky-number {
  color: #ffd36f;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.dh-lucky-footer {
  color: #d3c5a9;
  font-size: 9px;
}

.dh-lucky-finished .dh-lucky-number {
  color: #ffe39a;
  text-shadow: 0 0 8px #ffce6b80;
  animation: dh-lucky-pop .3s ease-out;
}

@keyframes dh-lucky-pop {
  0% { transform: scale(.75); }
  60% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* LUCKY COMPACT CARD */

.dh-lucky-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 5px;

  width: 125px;
  min-height: 36px;
  height: 36px;
  padding: 4px 6px;
}

.dh-lucky-title {
  font-size: 10px;
  white-space: nowrap;
}

.dh-lucky-number {
  font-size: 21px;
  line-height: 1;
}

.dh-lucky-footer {
  display: none;
}
/* محاذاة بطاقة الحظ لبداية سطر الرسالة */
h5.public_message__content.dh-lucky-message {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center !important;
  width: 20%;
  text-align: start !important;
  direction: ltr !important;
}

h5.public_message__content.dh-lucky-message .dh-lucky-card {
  margin: 0 !important;
  flex-shrink: 0;
}
/* Lucky card inside Jawal messages */

.u-msg.break.dh-lucky-message {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  direction: ltr;
}

.u-msg.break.dh-lucky-message .dh-lucky-card {
  flex: 0 0 125px;
  width: 125px;
  height: 36px;
  min-height: 36px;
  margin: 0;
}
/* Lucky Jawal - fix card and delete button positions */

.u-msg.break.dh-lucky-message {
  display: flex !important;
  flex-direction: row !important;
  direction: ltr !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100%;
}

.u-msg.break.dh-lucky-message > .dh-lucky-card {
  flex: 0 0 125px;
  width: 125px;
  margin: 0 !important;
  order: 0;
}

.u-msg.break.dh-lucky-message > .d-flex.fr {
  margin-left: auto !important;
  margin-right: 0 !important;
  order: 1;
}

/* DAHAB LUCKY - LIGHTWEIGHT REEL */

.dh-lucky-number {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.dh-lucky-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  text-align: center;
  background: #2b3140;
  color: #ffd36f;
  line-height: 1;
  animation: dhLuckyCover 2.4s steps(1, end) forwards;
}

.dh-lucky-track {
  display: block;
  white-space: pre;
  font: inherit;
  line-height: 1;
  text-align: center;
  animation: dhLuckySlide 2.4s
    cubic-bezier(.16,.7,.20,1) forwards;
}

@keyframes dhLuckySlide {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-9em);
  }
}

@keyframes dhLuckyCover {
  0%, 99% {
    visibility: visible;
  }

  100% {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dh-lucky-viewport {
    display: none !important;
  }
}
/* إخفاء قائمة رقم الحظ بالكامل عند إيقافها */
html.dh-lucky-off .dhg-dock {
  display: none !important;
}