/* Storefront theme "default": EcDatePicker - Jalali single/range date picker (js/ecdatepicker/ecdatepicker.js).
   Theme tokens from theme.css; every value has a fallback so the picker also works without the theme. */
.ec-dp { --ec-dp-cell: 46px; --ec-dp-off: #c4c6ca; --ec-dp-closed-bg: #f5f5f6; --ec-dp-warn-bg: #fff4e5; --ec-dp-warn: #b26a00;
    font-family: var(--ec-font, inherit); font-size: 14px; line-height: 1.5; color: var(--ec-text, #23254e); background: var(--ec-bg, #fff);
    direction: rtl; text-align: right; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.ec-dp *, .ec-dp *::before, .ec-dp *::after { box-sizing: border-box; }
.ec-dp[hidden], .ec-dp [hidden] { display: none !important; }
.ec-dp button { font-family: inherit; }
.ec-dp-inline { border: 1px solid var(--ec-border, #e0e0e2); border-radius: var(--ec-radius-lg, 16px); padding: 12px; max-width: 100%; }
.ec-dp-pop { position: absolute; top: 0; left: 0; z-index: 1060; border: 1px solid var(--ec-border, #e0e0e2); border-radius: var(--ec-radius-lg, 16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 12px; max-width: calc(100vw - 16px); }

/* header (bottom sheet only) */
.ec-dp-head { display: none; }
.ec-dp-x { width: 44px; height: 44px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ec-text, #23254e); border-radius: 50%; margin-inline-end: -10px; }
.ec-dp-x:hover { background: var(--ec-line, #f0f0f1); }

/* months + navigation */
.ec-dp-body { position: relative; }
.ec-dp-jumping .ec-dp-body { min-height: 330px; }
.ec-dp-months { display: flex; gap: 24px; justify-content: center; }
.ec-dp-month { flex: 1 1 0; min-width: 0; max-width: 440px; }
.ec-dp-pop .ec-dp-month { flex: 0 0 auto; width: calc(var(--ec-dp-cell) * 7); }
.ec-dp-title { display: block; margin: 0 auto 6px; height: 36px; padding: 0 12px; border: 0; background: none; font-size: 15px; font-weight: 700; color: var(--ec-text, #23254e); border-radius: var(--ec-radius, 8px); cursor: pointer; }
.ec-dp-title:hover { background: var(--ec-line, #f0f0f1); }
.ec-dp-nav, .ec-dp-nav-s { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ec-border, #e0e0e2); background: var(--ec-bg, #fff); color: var(--ec-text, #23254e);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ec-dp-nav { position: absolute; top: 0; z-index: 1; }
.ec-dp-prev { right: 0; }
.ec-dp-next { left: 0; }
.ec-dp-nav:hover:not(:disabled), .ec-dp-nav-s:hover:not(:disabled) { border-color: var(--ec-text-2, #3f4064); }
.ec-dp-nav:disabled, .ec-dp-nav-s:disabled { opacity: .3; cursor: default; }
.ec-dp-title:focus-visible, .ec-dp-nav:focus-visible, .ec-dp-nav-s:focus-visible, .ec-dp-btn:focus-visible, .ec-dp-x:focus-visible, .ec-dp-jump-m button:focus-visible { outline: 2px solid var(--ec-primary, #ef4056); outline-offset: 2px; }

/* grid */
.ec-dp-wk, .ec-dp-row { display: grid; grid-template-columns: repeat(7, minmax(var(--ec-dp-col-min, 40px), 1fr)); }
@media (max-width: 360px) { .ec-dp { --ec-dp-col-min: 34px; } }
.ec-dp-wk span { height: 28px; line-height: 28px; text-align: center; font-size: 12px; color: var(--ec-muted, #81858b); }
.ec-dp-wk abbr { text-decoration: none; border: 0; cursor: default; }
.ec-dp-wk .ec-dp-we { color: var(--ec-amazing, #ef394e); }
.ec-dp-row { margin-top: 2px; }
.ec-dp-day { position: relative; min-width: 0; min-height: var(--ec-dp-cell); padding: 3px 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: var(--ec-radius, 8px); cursor: pointer; user-select: none; outline: none; transition: background-color .12s; }
.ec-dp-n { font-size: 14px; font-weight: 500; line-height: 1.2; }
.ec-dp-lbl { max-width: 100%; margin-top: 2px; font-size: 10px; line-height: 1.2; color: var(--ec-muted, #81858b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 1px; }
.ec-dp-day:hover { background: var(--ec-line, #f0f0f1); }
.ec-dp-day:focus-visible { box-shadow: inset 0 0 0 2px var(--ec-text-2, #3f4064); }
.ec-dp-we .ec-dp-n { color: var(--ec-amazing, #ef394e); }
.ec-dp-today { box-shadow: inset 0 0 0 1px var(--ec-muted, #81858b); }
.ec-dp-today .ec-dp-n { font-weight: 800; }

/* availability states */
.ec-dp-limited::after { content: ""; position: absolute; top: 5px; left: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--ec-warning, #f9a825); }
.ec-dp-full, .ec-dp-full .ec-dp-n, .ec-dp-full .ec-dp-lbl { color: var(--ec-dp-off) !important; cursor: not-allowed; }
.ec-dp-full .ec-dp-n { text-decoration: line-through; }
.ec-dp-closed { background: var(--ec-dp-closed-bg); cursor: not-allowed; }
.ec-dp-closed .ec-dp-n, .ec-dp-closed .ec-dp-lbl { color: var(--ec-dp-off) !important; }
.ec-dp-off, .ec-dp-disabled { cursor: not-allowed; }
.ec-dp-off .ec-dp-n, .ec-dp-off .ec-dp-lbl, .ec-dp-disabled .ec-dp-n, .ec-dp-disabled .ec-dp-lbl { color: var(--ec-dp-off) !important; }
.ec-dp-off:hover, .ec-dp-disabled:hover, .ec-dp-full:hover { background: none; }
.ec-dp-closed:hover { background: var(--ec-dp-closed-bg); }
/* checkout-only: the evening (left half in RTL) is shaded - you may leave in the morning but not stay the night */
.ec-dp-co { background-image: linear-gradient(to bottom right, transparent calc(50% - .5px), var(--ec-border, #e0e0e2) calc(50% - .5px), var(--ec-border, #e0e0e2) calc(50% + .5px), var(--ec-dp-closed-bg) calc(50% + .5px)); }

/* selection */
.ec-dp-in, .ec-dp-pv { border-radius: 0; background-color: var(--ec-primary-soft, #fdecef); }
.ec-dp-pv { background-color: transparent; background-image: linear-gradient(var(--ec-primary-soft, #fdecef), var(--ec-primary-soft, #fdecef)); opacity: .85; }
.ec-dp-in:hover, .ec-dp-pv:hover { background-color: var(--ec-primary-soft, #fdecef); }
.ec-dp-pv-end { box-shadow: inset 0 0 0 2px var(--ec-primary, #ef4056); background-color: var(--ec-primary-soft, #fdecef); }
.ec-dp .ec-dp-sel { background: var(--ec-primary, #ef4056); box-shadow: none; }
.ec-dp .ec-dp-sel .ec-dp-n, .ec-dp .ec-dp-sel .ec-dp-lbl { color: #fff !important; text-decoration: none; }
.ec-dp .ec-dp-sel:focus-visible { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--ec-primary, #ef4056); }
.ec-dp .ec-dp-sel.ec-dp-limited::after { background: #fff; }
.ec-dp-range .ec-dp-start:not(.ec-dp-solo) { border-radius: 0 var(--ec-radius, 8px) var(--ec-radius, 8px) 0; }  /* RTL: start sits on the right */
.ec-dp-range .ec-dp-end { border-radius: var(--ec-radius, 8px) 0 0 var(--ec-radius, 8px); }
.ec-dp-beyond { opacity: .38; }
.ec-dp-short { opacity: .6; }

/* message + footer */
.ec-dp-msg { display: none; margin-top: 10px; padding: 8px 12px; border-radius: var(--ec-radius, 8px); background: var(--ec-dp-warn-bg); color: var(--ec-dp-warn); font-size: 12px; line-height: 1.8; }
.ec-dp-msg.ec-dp-msg-on { display: block; }
.ec-dp-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ec-line, #f0f0f1); }
.ec-dp-sum { font-size: 12px; color: var(--ec-text-2, #3f4064); line-height: 1.8; }
.ec-dp-sum b { color: var(--ec-text, #23254e); font-weight: 700; }
.ec-dp-sum .ec-dp-nights { color: var(--ec-primary, #ef4056); }
.ec-dp-acts { display: flex; gap: 8px; margin-inline-start: auto; }
.ec-dp-btn { min-height: 36px; padding: 0 14px; border: 1px solid var(--ec-border, #e0e0e2); border-radius: var(--ec-radius, 8px); background: var(--ec-bg, #fff);
    font-size: 12px; font-weight: 700; color: var(--ec-text, #23254e); cursor: pointer; white-space: nowrap; }
.ec-dp-btn:hover:not(:disabled) { border-color: var(--ec-text-2, #3f4064); }
.ec-dp-btn:disabled { opacity: .4; cursor: default; }
.ec-dp-btn-clear { color: var(--ec-primary, #ef4056); }

/* month / year quick jump */
.ec-dp-jump { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 2px; background: var(--ec-bg, #fff); }
.ec-dp-jump-y { display: flex; align-items: center; gap: 20px; font-size: 16px; }
.ec-dp-jump-m { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; }
.ec-dp-jump-m button { min-height: 44px; border: 1px solid var(--ec-border, #e0e0e2); border-radius: var(--ec-radius, 8px); background: var(--ec-bg, #fff); font-size: 14px; color: var(--ec-text, #23254e); cursor: pointer; }
.ec-dp-jump-m button:hover:not(:disabled) { border-color: var(--ec-text-2, #3f4064); }
.ec-dp-jump-m button:disabled { color: var(--ec-dp-off); cursor: default; }
.ec-dp-jump-m .ec-dp-cur { border-color: var(--ec-primary, #ef4056); color: var(--ec-primary, #ef4056); font-weight: 700; }

/* two months that do not fit side by side are stacked */
.ec-dp-inline.ec-dp-stack .ec-dp-months { flex-direction: column; align-items: stretch; gap: 16px; }  /* set by a ResizeObserver */
.ec-dp-inline.ec-dp-stack .ec-dp-month { max-width: none; }
@media (max-width: 720px) { .ec-dp-pop.ec-dp-two .ec-dp-months { flex-direction: column; } }

/* mobile bottom sheet (popup mode, viewport <= 576px) */
.ec-dp-backdrop { position: fixed; inset: 0; z-index: 1060; background: rgba(0, 0, 0, .4); animation: ec-dp-fade .2s ease-out; }
.ec-dp.ec-dp-sheet { position: fixed; top: auto !important; left: 0 !important; right: 0; bottom: 0; z-index: 1061; width: 100%; max-width: none; max-height: 92vh; max-height: 92dvh;
    overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 16px 16px 0 0; padding: 0 16px; box-shadow: 0 -8px 24px rgba(0, 0, 0, .18); animation: ec-dp-up .22s ease-out; }
.ec-dp-sheet .ec-dp-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 3; margin: 0 -16px 12px; padding: 8px 16px; background: var(--ec-bg, #fff); border-bottom: 1px solid var(--ec-line, #f0f0f1); }
.ec-dp-head-title { font-size: 15px; }
.ec-dp-sheet .ec-dp-months { flex-direction: column; gap: 16px; }
.ec-dp-sheet .ec-dp-month { width: auto; max-width: none; }
.ec-dp-sheet .ec-dp-foot { position: sticky; bottom: 0; z-index: 3; margin: 10px -16px 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--ec-bg, #fff); }
.ec-dp-sheet .ec-dp-btn { min-height: 44px; }
html.ec-dp-lock, html.ec-dp-lock body { overflow: hidden; }
@keyframes ec-dp-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ec-dp-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ec-dp, .ec-dp-backdrop, .ec-dp-day { animation: none !important; transition: none !important; } }
.ec-dp-noin .ec-dp-n { opacity: .6; }
