:root{
  --sdp-accent: #7c3aed;
  --sdp-accent-2: #0ea5e9;
}
.sdp-overlay{
  position: fixed; inset: 0;
  background: rgba(9,12,17,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 999999;
  direction: rtl;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Vazirmatn,Arial,sans-serif;
  padding: 20px;
}
.sdp-modal{
  width: min(92vw, 560px);
  background: linear-gradient(180deg, #ffffff, #fbfbff);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  overflow: hidden;
  position: relative;
  transform: translateY(10px) scale(.98);
  opacity: 0;
}
.sdp-animate-in{ animation: sdpIn .2s ease-out forwards; }
.sdp-animate-out{ animation: sdpOut .18s ease-in forwards; }
@keyframes sdpIn{ to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes sdpOut{ to { transform: translateY(10px) scale(.98); opacity: 0; } }

.sdp-ribbon{
  position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--sdp-accent), var(--sdp-accent-2));
}
.sdp-close{
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  font-size: 16px; line-height: 1;
  padding: 6px 8px; cursor: pointer; color: #444;
  transition: .15s ease;
}
.sdp-close:hover, .sdp-close:focus-visible{
  background: rgba(0,0,0,.08);
  outline: none;
}

.sdp-header{
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px 10px 24px;
}
.sdp-icon{ font-size: 28px; }
.sdp-title{
  font-weight: 800; font-size: 19px; letter-spacing: -.2px;
  background: linear-gradient(90deg, var(--sdp-accent), var(--sdp-accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.sdp-body{
  padding: 0 24px 18px 24px;
  line-height: 1.9; color: #242424;
}
.sdp-body code{
  background: #eef2ff; padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, monospace;
}

.sdp-countdown{
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px; padding: 0 24px 10px 24px;
}
.sdp-unit{
  background: #f6f8ff; border: 1px solid #eef2ff; border-radius: 12px;
  padding: 10px 8px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.sdp-unit span{
  display: block; font-weight: 800; font-size: 18px;
}
.sdp-unit small{
  display: block; font-size: 11px; opacity: .75; margin-top: 2px;
}

.sdp-actions{
  padding: 16px 24px 22px 24px; display: flex; gap: 10px; justify-content: flex-start;
}
.sdp-btn{
  border: 0; cursor: pointer; padding: 12px 18px;
  border-radius: 12px; font-weight: 800; font-size: 14px;
  transition: transform .08s ease, box-shadow .2s ease;
}
.sdp-primary{
  background: linear-gradient(90deg, var(--sdp-accent), var(--sdp-accent-2)); color: #fff;
  box-shadow: 0 10px 26px rgba(14,165,233,.35);
}
.sdp-primary:hover, .sdp-primary:focus-visible{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(14,165,233,.4);
  outline: none;
}

@media (prefers-color-scheme: dark){
  .sdp-overlay{ background: rgba(3,6,12,.6); }
  .sdp-modal{ background: linear-gradient(180deg, #12151d, #0f1320); }
  .sdp-body{ color: #eaeefb; }
  .sdp-close{ color: #ddd; border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
  .sdp-unit{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
}
.sdp-modal-open{ overflow: hidden; }
