/* DGDate — спільний календар (public/js/dg-datepicker.js). Телефон — аркуш знизу, комп'ютер — спливає біля поля. */
.dgd{ position:fixed; inset:0; z-index:10080; font-family:inherit; }
.dgd[hidden]{ display:none; }
.dgd__scrim{ position:absolute; inset:0; background:rgba(28,22,16,.42); opacity:0; transition:opacity .16s ease; }
.dgd.is-open .dgd__scrim{ opacity:1; }
.dgd--pop .dgd__scrim{ background:transparent; }
.dgd__sheet{ position:absolute; box-sizing:border-box; background:#fff; color:#201d1a; box-shadow:0 24px 60px rgba(30,20,10,.22); }
.dgd *{ box-sizing:border-box; }

/* Комп'ютер: спливаюче вікно під полем */
.dgd--pop .dgd__sheet{ width:340px; padding:16px 16px 12px; border-radius:20px; border:1px solid #efe6dc; opacity:0; transform:translateY(-6px); transition:opacity .16s ease, transform .16s ease; }
.dgd--pop.is-open .dgd__sheet{ opacity:1; transform:none; }
.dgd--pop .dgd__grab{ display:none; }

/* Телефон: аркуш знизу на всю ширину */
.dgd--sheet .dgd__sheet{ left:0; right:0; bottom:0; max-height:92vh; overflow:auto; padding:8px 16px calc(16px + env(safe-area-inset-bottom)); border-radius:24px 24px 0 0;
  transform:translateY(100%); transition:transform .2s cubic-bezier(.2,.8,.2,1); }
.dgd--sheet.is-open .dgd__sheet{ transform:none; }
.dgd__grab{ width:42px; height:5px; margin:0 auto 10px; border-radius:99px; background:#e4dbd1; }
html.dgd-lock, html.dgd-lock body{ overflow:hidden !important; }

.dgd__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.dgd__title{ font-size:17px; font-weight:800; line-height:1.25; }
.dgd__value{ margin-top:2px; font-size:13.5px; font-weight:600; color:#c0662c; }
.dgd__x{ flex:none; width:36px; height:36px; border:0; border-radius:50%; background:#f5efe8; color:#5b524b; font-size:24px; line-height:1; cursor:pointer; }
.dgd__x:hover{ background:#eee4d9; }

.dgd__quick{ display:flex; gap:8px; margin-bottom:12px; overflow-x:auto; scrollbar-width:none; }
.dgd__quick::-webkit-scrollbar{ display:none; }
.dgd__chip{ flex:1 0 auto; min-height:40px; padding:0 14px; border:1.5px solid #ece2d7; border-radius:999px; background:#fff; color:#3d3833; font:inherit; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap; }
.dgd__chip:hover{ border-color:#d67940; color:#c0662c; }
.dgd__chip.is-sel{ background:#d67940; border-color:#d67940; color:#fff; }
.dgd__chip:disabled{ opacity:.4; cursor:not-allowed; }

.dgd__nav{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.dgd__month{ font-size:16px; font-weight:800; }
.dgd__arrow{ width:40px; height:40px; border:0; border-radius:12px; background:#f7f1ea; color:#3d3833; font-size:24px; line-height:1; cursor:pointer; }
.dgd__arrow:hover:not(:disabled){ background:#fdeee3; color:#c0662c; }
.dgd__arrow:disabled{ opacity:.3; cursor:not-allowed; }

.dgd__wd, .dgd__grid{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:4px; }
.dgd__mt{ margin:14px 0 6px; padding-top:12px; border-top:1px solid #f1e9e0; font-size:15px; font-weight:800; text-align:center; }
.dgd--pop .dgd__months{ max-height:min(60vh, 520px); overflow-y:auto; }
.dgd--sheet .dgd__months{ max-height:min(52vh, 440px); overflow-y:auto; overscroll-behavior:contain; margin:0 -4px; padding:0 4px; }
.dgd__wd{ margin-bottom:4px; }
.dgd__wd span{ text-align:center; font-size:12px; font-weight:800; color:#9a8f86; padding:4px 0; }
.dgd__wd span.is-we{ color:#c0662c; }
.dgd__day{ position:relative; height:42px; border:0; border-radius:12px; background:transparent; color:#201d1a; font:inherit; font-size:15px; font-weight:700; cursor:pointer; }
.dgd--sheet .dgd__day{ height:48px; font-size:16px; }
.dgd__day.is-we{ color:#b85f2a; }
.dgd__day:hover:not(:disabled){ background:#fdeee3; }
.dgd__day:focus-visible, .dgd__chip:focus-visible, .dgd__arrow:focus-visible, .dgd__x:focus-visible{ outline:2px solid #d67940; outline-offset:2px; }
.dgd__day.is-today::after{ content:''; position:absolute; left:50%; bottom:6px; width:5px; height:5px; margin-left:-2.5px; border-radius:50%; background:#d67940; }
.dgd__day.is-sel{ background:#d67940; color:#fff; }
.dgd__day.is-sel::after{ background:#fff; }
.dgd__day:disabled{ color:#cfc6bd; cursor:not-allowed; background:transparent; }

.dgd__foot{ display:flex; justify-content:center; margin-top:8px; min-height:4px; }
.dgd__clear{ border:0; background:none; padding:8px 12px; color:#c0662c; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.dgd__clear[hidden]{ display:none; }

/* Поле з календарем: курсор і значок */
.dgd-field{ cursor:pointer; caret-color:transparent; }
