/* DoctorYo R18 • Universal Persian Calendar + Clock.
   Replaces all legacy Jalali popup, native date widgets, and time dropdowns.
   Global styles intentionally work inside patient drawers, reception, courses,
   appointments, billing and mobile forms. */
html body .dyc-field{
  display:inline-flex!important;position:relative;vertical-align:middle;
  width:100%;max-width:100%;min-width:0;
  align-items:stretch;flex-direction:column;direction:rtl;
  box-sizing:border-box;isolation:isolate;
}
html body .dyc-field > input[data-dy-calendar-v2]{
  display:none!important;position:absolute!important;visibility:hidden!important;
  width:0!important;height:0!important;padding:0!important;pointer-events:none!important;
}
html body .dyc-trigger{
  appearance:none;-webkit-appearance:none;
  display:flex!important;align-items:center;justify-content:space-between;
  gap:11px;width:100%!important;max-width:100%;min-width:0;
  min-height:46px!important;box-sizing:border-box;
  padding:9px 12px!important;margin:0!important;
  background:#fff!important;color:#183d55!important;
  border:1px solid #cbdde6!important;border-radius:12px!important;
  box-shadow:0 2px 9px rgba(20,60,88,.035)!important;
  font-family:Vazirmatn,Tahoma,sans-serif!important;
  font-size:13px!important;font-weight:700!important;line-height:1.7!important;
  text-align:start!important;cursor:pointer!important;
  transition:border-color .16s,box-shadow .16s,background .16s;
}
html body .dyc-trigger:hover:not(:disabled){border-color:#27a0ae!important;background:#f9fdfd!important}
html body .dyc-trigger:focus-visible{
  outline:2px solid #0f8998!important;outline-offset:2px!important;
  box-shadow:0 0 0 4px rgba(22,156,165,.12)!important;
}
html body .dyc-trigger:disabled{opacity:.55!important;cursor:not-allowed!important}
html body .dyc-trigger.dyc-empty{color:#708b9b!important;font-weight:550!important}
html body .dyc-trigger > .dyc-value{
  flex:1;min-width:0;text-align:right;white-space:normal;word-break:normal;
}
html body .dyc-trigger .dyc-symbol{
  width:31px;height:31px;min-width:31px;display:grid;place-items:center;
  border-radius:9px;background:#ebf8f8;color:#088895;
  font-size:21px;line-height:1;
}
html body .dyc-trigger .dyc-caret{font-size:21px;color:#90a7b3;line-height:1}
html body .dyc-field.dyc-invalid .dyc-trigger{
  border-color:#d75e5e!important;box-shadow:0 0 0 3px rgba(215,94,94,.08)!important;
}
html body .dyc-error{display:block;margin:5px 3px 0;color:#ba3d45;font-size:11px;line-height:1.8}
html body .dyc-error[hidden]{display:none!important}

/* Single fixed modal escapes any overflow-hidden card, table or drawer. */
html body .dyc-overlay{
  position:fixed!important;inset:0!important;z-index:2147483000!important;
  display:flex;align-items:center;justify-content:center;
  box-sizing:border-box;
  padding:18px;direction:rtl;
  background:rgba(9,29,47,.58);
  backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);
}
html body .dyc-overlay *{box-sizing:border-box}
html body .dyc-dialog{
  width:min(100%,420px);max-height:min(90dvh,740px);overflow-x:hidden;overflow-y:auto;
  border:1px solid rgba(218,237,244,.95);
  border-radius:22px;padding:0;
  background:#fff;color:#213d50;
  font-family:Vazirmatn,Tahoma,sans-serif;
  box-shadow:0 35px 100px rgba(4,20,35,.33);
  overscroll-behavior:contain;
  animation:dyc-rise .2s ease-out;
}
html body .dyc-dialog:focus{outline:none}
html body .dyc-top{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:14px;padding:21px 22px 17px;
  background:linear-gradient(115deg,#f0fbfa,#eef5fc 78%,#fff);
  border-bottom:1px solid #dfedf0;
}
html body .dyc-top small{
  display:block;direction:ltr;text-align:right;font-size:10px;
  color:#6d94a6;font-weight:700;letter-spacing:1px;
}
html body .dyc-top h2{
  margin:5px 0 0!important;font-size:21px!important;line-height:1.5;
  color:#174358!important;font-weight:850!important;
}
html body .dyc-x{
  flex:none;display:grid;place-items:center;
  width:36px!important;height:36px!important;border-radius:11px!important;
  background:#fff!important;color:#557183!important;
  border:1px solid #d7e6ec!important;font:24px/1 Arial,sans-serif!important;cursor:pointer!important;
}
html body .dyc-calendar{padding:16px 19px 4px}
html body .dyc-calendar[hidden],html body .dyc-time[hidden]{display:none!important}
html body .dyc-month-row{
  display:grid;grid-template-columns:36px minmax(0,1fr) 94px 36px;
  align-items:center;gap:7px;margin-bottom:15px;
}
html body .dyc-month-row select,
html body .dyc-time select{
  appearance:auto!important;
  color:#285067!important;background:#f7fafc!important;
  border:1px solid #d6e4ec!important;border-radius:10px!important;
  min-width:0;width:100%;min-height:40px!important;padding:7px 8px!important;
  font:700 13px/1.7 Vazirmatn,Tahoma,sans-serif!important;
  text-align:center;cursor:pointer;
}
html body .dyc-month-row select:focus-visible,
html body .dyc-time select:focus-visible{
  outline:2px solid #148f9b;outline-offset:1px;
}
html body .dyc-nav{
  display:grid!important;place-items:center;
  width:36px!important;height:40px!important;padding:0!important;
  background:#edf8f8!important;border:1px solid #d6eded!important;
  border-radius:10px!important;color:#138a94!important;
  font:700 17px/1 Vazirmatn,Tahoma,sans-serif!important;
  cursor:pointer!important;
}
html body .dyc-weekdays,html body .dyc-days{
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  direction:rtl;gap:4px;
}
html body .dyc-weekdays{margin-bottom:8px}
html body .dyc-weekdays span{
  text-align:center;font-size:11px;color:#869caa;font-weight:800;
  padding:3px 0 5px;
}
html body .dyc-days{align-items:stretch}
html body .dyc-days .dyc-blank{min-height:42px}
html body .dyc-day{
  appearance:none;display:grid!important;place-items:center;
  width:100%!important;min-width:0!important;min-height:42px!important;
  padding:0!important;margin:0!important;
  background:transparent!important;border:1px solid transparent!important;
  border-radius:10px!important;
  color:#29495d!important;font:750 13px/1.5 Vazirmatn,Tahoma,sans-serif!important;
  cursor:pointer!important;transition:background .13s,color .13s;
}
html body .dyc-day:hover:not(:disabled){background:#e6f6f7!important}
html body .dyc-day.is-today{border-color:#b6e3e2!important;background:#f0faf9!important}
html body .dyc-day.is-selected{
  color:#fff!important;background:#0b8595!important;border-color:#0b8595!important;
  box-shadow:0 5px 14px rgba(11,133,149,.20);
}
html body .dyc-day:disabled{opacity:.23!important;cursor:not-allowed!important}
html body .dyc-day:focus-visible{outline:2px solid #096e83;outline-offset:2px}
html body .dyc-time{
  display:flex;align-items:end;justify-content:center;
  gap:14px;margin:12px 18px 0;padding:13px;
  background:#f3f9fb;border:1px solid #e0ebef;border-radius:13px;
}
html body .dyc-time label{
  display:flex;flex-direction:column;gap:6px;min-width:0;width:113px;
  text-align:center;color:#607c8a;font-size:11px;font-weight:800;
}
html body .dyc-time select{min-height:46px!important;font-size:16px!important}
html body .dyc-time-colon{font-weight:850;font-size:24px;color:#6ca3ac;padding-bottom:7px}
html body .dyc-hint{
  min-height:19px;margin:9px 19px 0!important;
  font-size:11px!important;color:#b34b50!important;text-align:center;
}
html body .dyc-actions{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;
  padding:12px 19px 19px;
  position:sticky;bottom:0;z-index:3;
  background:rgba(255,255,255,.98);
  border-top:1px solid #e3edf0;
  box-shadow:0 -7px 21px rgba(18,55,78,.045);
}
html body .dyc-actions button{
  border-radius:11px!important;min-height:43px!important;
  padding:9px 13px!important;
  cursor:pointer!important;font:750 12px/1.6 Vazirmatn,Tahoma,sans-serif!important;
}
html body .dyc-secondary{background:#f1f6f9!important;border:1px solid #e2ebee!important;color:#466776!important}
html body .dyc-primary{
  flex:1;min-width:125px;background:#087e90!important;border:1px solid #087e90!important;
  color:#fff!important;box-shadow:0 7px 16px rgba(8,126,144,.17);
}
html body .dyc-actions button:hover{filter:brightness(.97)}
html body .dyc-actions button:focus-visible{outline:2px solid #147f90;outline-offset:2px}
html body .dyc-actions button[hidden]{display:none!important}
html body .dyc-dialog [hidden]{display:none!important}
@media(max-width:620px){
  html body .dyc-overlay{align-items:flex-end;padding:0!important}
  html body .dyc-dialog{
    width:100%!important;max-width:none!important;
    border-radius:22px 22px 0 0!important;
    max-height:min(94dvh,800px)!important;
    padding-bottom:env(safe-area-inset-bottom,0px);
    animation:dyc-sheet .23s ease-out;
  }
  html body .dyc-top{padding:17px 20px 13px}
  html body .dyc-calendar{padding:12px 14px 2px}
  html body .dyc-day{min-height:43px!important}
  html body .dyc-month-row{grid-template-columns:36px minmax(0,1fr) 82px 36px;gap:5px}
  html body .dyc-actions{padding:10px 14px 14px}
}
@media(max-width:360px){
  html body .dyc-day{min-height:38px!important}
  html body .dyc-month-row{grid-template-columns:30px minmax(0,1fr) 74px 30px}
  html body .dyc-nav{width:30px!important}
  html body .dyc-time{gap:9px}
}
@media(prefers-reduced-motion:reduce){
  html body .dyc-dialog{animation:none!important}
  html body .dyc-trigger{transition:none!important}
}
@media print{html body .dyc-overlay{display:none!important}}
@keyframes dyc-rise{from{opacity:.65;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes dyc-sheet{from{transform:translateY(30px);opacity:.8}to{transform:translateY(0);opacity:1}}
