
/* ===============================
   Shadow Baghdad – Size Calculator
   Dark Mode UI (Brand Match)
   Site bg: #1c1b19 | Buttons: #555555 | Text: #ffffff
   =============================== */

/* === FORCE ISOLATION FROM THEME === */
.sb-sizecalc-wrapper{
  all: initial;
  direction: rtl;
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  text-align: right;
  color: #ffffff;
}

.sb-sizecalc-wrapper *{
  all: unset;
  box-sizing: border-box;
  direction: rtl;
  font-family: inherit;
  color: inherit;
}

/* ===== Card ===== */
.sb-sizecalc-card{
  display:block;
  background: #1c1b19;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  padding: 20px;
  max-width: 680px;
  margin: 0 auto;
}

/* ===== Title ===== */
.sb-sizecalc-title{
  display:block;
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px;
}

/* ===== Layout ===== */
.sb-sizecalc-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-sizecalc-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}

@media (min-width: 700px){
  .sb-sizecalc-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Labels ===== */
.sb-sizecalc-label{
  display:block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* ===== Inputs ===== */
.sb-sizecalc-input,
select,
input{
  all: unset;
  box-sizing: border-box;
  width: 100%;
}

.sb-sizecalc-input{
  background: #1c1b19;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: #ffffff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sb-sizecalc-input:focus{
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

/* ===== Alert ===== */
.sb-sizecalc-alert{
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
}
.sb-sizecalc-alert.is-visible{ display:block; }

/* ===== Button ===== */
.sb-sizecalc-button{
  all: unset;
  box-sizing: border-box;
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  background: #555555;
  color: #ffffff;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .2s ease, transform .15s ease;
}

.sb-sizecalc-button:hover{ background: #6b6b6b; }
.sb-sizecalc-button:active{ transform: translateY(1px); }

/* ===== Result ===== */
.sb-sizecalc-result{ display:block; margin-top: 18px; }
.sb-sizecalc-result[hidden]{ display:none !important; }

.sb-sizecalc-result-inner{
  display:block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 16px;
}

.sb-sizecalc-result-label{
  display:block;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.sb-sizecalc-result-size{
  display:block;
  margin-top: 6px;
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
}

.sb-sizecalc-result-note{
  display:block;
  margin-top: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
}

/* خلي حقول الإدخال دارك مثل الهوية */
.sb-sizecalc-wrapper input.sb-sizecalc-input,
.sb-sizecalc-wrapper select.sb-sizecalc-input{
  background: #1c1b19 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}
/* إصلاح لون نص خيارات حقل الجنس */
.sb-sizecalc-wrapper select.sb-sizecalc-input option{
  background-color: #1c1b19;
  color: #ffffff;
}

/* حل مشكلة ظهور الأرقام العربية داخل الحقول (إظهار أرقام إنجليزية) */
.sb-sizecalc-wrapper input.sb-sizecalc-input{
  direction: ltr !important;
  text-align: right !important; /* يحافظ على RTL */
  unicode-bidi: plaintext;
  font-variant-numeric: lining-nums;
}
