/* رحلة الثروة — Auction UI Polish v170
   Dedicated final-layer styling for auction decisions.
   Goal: one compact premium modal, no nested visual shells, no horizontal scroll. */

body.auction-ui-v170{--a170-bg:#061f34;--a170-bg2:#0a314e;--a170-gold:#f4bd3a;--a170-gold2:#ffe58a;--a170-cyan:#55ddea;--a170-cream:#fff4d6;--a170-red:#dc515a}

/* The generic cream popup shell was fighting the dark auction card. Collapse it into one visual component. */
body.auction-ui-v170 .popup:has(.auction-pop165){
  padding:clamp(10px,2vw,24px)!important;
  background:rgba(1,16,28,.72)!important;
  backdrop-filter:blur(10px) saturate(.88)!important;
}
body.auction-ui-v170 .popup:has(.auction-pop165)>.pop{
  width:min(560px,calc(100vw - 28px))!important;
  max-width:560px!important;
  max-height:min(88svh,680px)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid rgba(255,215,102,.72)!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 50% -20%,rgba(83,225,238,.16),transparent 38%),
    linear-gradient(180deg,#0b3554 0%,#061f34 42%,#041725 100%)!important;
  color:#fff!important;
  box-shadow:0 30px 90px rgba(0,8,17,.72),0 8px 0 #4d3108,inset 0 0 0 1px rgba(255,255,255,.08),0 0 0 5px rgba(244,189,58,.08)!important;
}
body.auction-ui-v170 .popup:has(.auction-pop165)>.pop::before{
  content:"";display:block;height:5px;
  background:linear-gradient(90deg,#8b5a12,#ffe37d,#f2ad21,#fff0a6,#8b5a12);
  box-shadow:0 1px 12px rgba(255,205,72,.55);
}

body.auction-ui-v170 .auction-pop165{
  min-width:0!important;
  width:100%!important;
  padding:20px 22px 22px!important;
  color:#fff!important;
  text-align:center!important;
  direction:rtl;
}
body.auction-ui-v170 .auction-pop165 .pop-icon{
  width:66px!important;height:66px!important;margin:0 auto 8px!important;
  display:grid!important;place-items:center!important;
  border-radius:20px!important;
  border:1px solid rgba(255,220,116,.8)!important;
  background:linear-gradient(180deg,#fff5c9,#f5c14a)!important;
  color:#332006!important;font-size:31px!important;
  box-shadow:0 8px 18px rgba(0,0,0,.28),inset 0 1px 0 #fff!important;
}
body.auction-ui-v170 .auction-kicker165{
  display:block!important;margin-top:2px!important;
  color:var(--a170-cyan)!important;font:900 11px Cairo,sans-serif!important;
  letter-spacing:0!important;
}
body.auction-ui-v170 .auction-pop165 h3{
  margin:4px 0 14px!important;color:#fff2c4!important;
  font:900 clamp(25px,4vw,34px) Cairo,sans-serif!important;
  line-height:1.1!important;text-shadow:0 2px 0 #493007,0 0 18px rgba(244,189,58,.2)!important;
}

/* Current bid = focal point, not a full-width awkward dark bar. */
body.auction-ui-v170 .auction-price165{
  display:grid!important;grid-template-columns:1fr!important;place-items:center!important;gap:2px!important;
  margin:0 auto 10px!important;padding:12px 16px 13px!important;
  width:min(100%,390px)!important;
  border:1px solid rgba(244,189,58,.58)!important;border-radius:16px!important;
  background:linear-gradient(180deg,rgba(12,56,86,.96),rgba(5,31,51,.96))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 20px rgba(0,0,0,.18)!important;
}
body.auction-ui-v170 .auction-price165 span{color:#a9c9d8!important;font:800 9px Cairo,sans-serif!important}
body.auction-ui-v170 .auction-price165 b{color:var(--a170-gold2)!important;font:900 clamp(26px,5vw,38px) Cairo,sans-serif!important;line-height:1.08!important}
body.auction-ui-v170 .auction-meter165{
  width:min(100%,390px)!important;height:8px!important;margin:0 auto 12px!important;
  border:1px solid rgba(108,157,180,.48)!important;border-radius:999px!important;
  background:#021521!important;overflow:hidden!important;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.4)!important;
}
body.auction-ui-v170 .auction-meter165 i{height:100%!important;border-radius:inherit!important;background:linear-gradient(90deg,#36dce8 0%,#65e7c2 36%,#ffe36c 65%,#ff7867 100%)!important;box-shadow:0 0 13px rgba(85,221,234,.45)!important}
body.auction-ui-v170 .auction-pop165 .pop-sub{
  margin:0 auto 11px!important;color:#c5dce7!important;
  font:800 10px/1.7 Cairo,sans-serif!important;
}

/* Participants: clean chips, all inside the modal. */
body.auction-ui-v170 .auction-bidders165{
  display:flex!important;justify-content:center!important;align-items:center!important;gap:7px!important;
  flex-wrap:wrap!important;margin:5px auto 14px!important;max-width:100%!important;
}
body.auction-ui-v170 .auction-bidders165 span{
  display:inline-flex!important;align-items:center!important;gap:6px!important;
  min-width:0!important;padding:4px 8px 4px 5px!important;
  border:1px solid #315d77!important;border-radius:999px!important;
  background:#082b45!important;color:#d5e8f0!important;font:800 8px Cairo,sans-serif!important;
}
body.auction-ui-v170 .auction-bidders165 img{width:27px!important;height:27px!important;border-radius:50%!important;object-fit:cover!important;border:1px solid #d0a23a!important}
body.auction-ui-v170 .auction-bidders165 .leader{border-color:#ffd867!important;color:#ffe58a!important;background:#183b4e!important;box-shadow:0 0 0 2px rgba(255,216,103,.08),0 0 15px rgba(244,189,58,.2)!important}
body.auction-ui-v170 .auction-bidders165 .passed{opacity:.38!important;filter:grayscale(.8)!important}

/* Decision buttons: large, consistent, no horizontal overflow. */
body.auction-ui-v170 .auction-pop165 .auction-actions165{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;margin:0!important;padding:14px 0 0!important;
  border-top:1px solid rgba(211,168,66,.38)!important;
}
body.auction-ui-v170 .auction-pop165 .auction-actions165 button{
  width:100%!important;min-width:0!important;min-height:54px!important;
  padding:8px 10px!important;border-radius:13px!important;
  font:900 11px Cairo,sans-serif!important;line-height:1.25!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
  cursor:pointer!important;transition:transform .12s ease,filter .12s ease,box-shadow .12s ease!important;
}
body.auction-ui-v170 .auction-pop165 .auction-actions165 button:not(.ghost){
  border:1px solid #fff0a6!important;
  background:linear-gradient(180deg,#ffdc68 0%,#efa91f 62%,#c87a0d 100%)!important;
  color:#382305!important;
  box-shadow:0 5px 0 #80500d,0 8px 17px rgba(0,0,0,.22),inset 0 1px 0 #fff6c5!important;
}
body.auction-ui-v170 .auction-pop165 .auction-actions165 .ghost:not(.danger165){
  border:1px solid #69c7ee!important;
  background:linear-gradient(180deg,#299cda,#0d6dad)!important;
  color:white!important;box-shadow:0 5px 0 #064f7f,0 8px 17px rgba(0,0,0,.2)!important;
}
body.auction-ui-v170 .auction-pop165 .auction-actions165 .danger165{
  border:1px solid #ff9599!important;background:linear-gradient(180deg,#d84f5a,#9f2935)!important;
  color:#fff!important;box-shadow:0 5px 0 #631620,0 8px 17px rgba(0,0,0,.22)!important;
}
body.auction-ui-v170 .auction-pop165 .auction-actions165 button:not(:disabled):active{transform:translateY(4px)!important;box-shadow:0 1px 0 #4c320c!important}
body.auction-ui-v170 .auction-pop165 .auction-actions165 button:disabled{opacity:.38!important;filter:grayscale(.35)!important;cursor:not-allowed!important}

/* Kill any inherited scrollbars caused by old responsive/modal layers. */
body.auction-ui-v170 .popup:has(.auction-pop165)>.pop,
body.auction-ui-v170 .auction-pop165{overflow-x:hidden!important;scrollbar-width:none!important}
body.auction-ui-v170 .popup:has(.auction-pop165)>.pop::-webkit-scrollbar,
body.auction-ui-v170 .auction-pop165::-webkit-scrollbar{display:none!important}

@media(max-width:620px){
  body.auction-ui-v170 .popup:has(.auction-pop165){padding:8px!important}
  body.auction-ui-v170 .popup:has(.auction-pop165)>.pop{width:calc(100vw - 16px)!important;max-height:calc(100svh - 16px)!important;border-radius:18px!important}
  body.auction-ui-v170 .auction-pop165{padding:14px 12px 15px!important}
  body.auction-ui-v170 .auction-pop165 .pop-icon{width:54px!important;height:54px!important;border-radius:16px!important;font-size:25px!important}
  body.auction-ui-v170 .auction-pop165 h3{font-size:26px!important;margin-bottom:10px!important}
  body.auction-ui-v170 .auction-price165{padding:9px 12px!important;border-radius:13px!important}
  body.auction-ui-v170 .auction-price165 b{font-size:29px!important}
  body.auction-ui-v170 .auction-bidders165{margin-bottom:10px!important;gap:5px!important}
  body.auction-ui-v170 .auction-bidders165 span{font-size:7px!important;padding:3px 6px!important}
  body.auction-ui-v170 .auction-bidders165 img{width:23px!important;height:23px!important}
  body.auction-ui-v170 .auction-pop165 .auction-actions165{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding-top:11px!important}
  body.auction-ui-v170 .auction-pop165 .auction-actions165 button{min-height:48px!important;font-size:9px!important;padding:7px 6px!important}
}

@media(max-width:380px){
  body.auction-ui-v170 .auction-pop165{padding-inline:9px!important}
  body.auction-ui-v170 .auction-pop165 .auction-actions165{grid-template-columns:1fr!important}
  body.auction-ui-v170 .auction-pop165 .auction-actions165 button{min-height:45px!important}
}
