/* [GCG-1593] GoComGo single date calendar: event page (modal / bottom sheet) and performance page (inline).
   Same look as one month of the city date range picker (gcg-datepicker.css): month chips, arrows, title and rows;
   a date with sessions is a soft yellow circle, the selected one is black, other dates are grey and not clickable.
   No external assets. */
.gev-cal, .gev-dialog, .gev-field {
    --gev-ink: #1a1a1a;
    --gev-muted: #8a8a8a;
    --gev-line: #e3e3e3;
    --gev-avail: #fff1c9;
    --gev-off: #c8c8c8;
}
.gev-cal *, .gev-dialog *, .gev-field * { box-sizing: border-box; }

/* ---------- date field on the event page ---------- */
.gev-field {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 8px 0 12px;
    padding: 8px 12px; border: 1px solid #cfcfcf; border-radius: 8px; background: #fff;
    font: inherit; font-size: 15px; color: var(--gev-ink); text-align: left; cursor: pointer;
}
.gev-field:hover { border-color: var(--gev-ink); }
.gev-field:focus-visible { outline: 2px solid var(--gev-ink); outline-offset: 2px; }
.gev-field-ico { flex: 0 0 auto; width: 18px; height: 18px; color: #555; }
.gev-field-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gev-field-chev { flex: 0 0 auto; width: 14px; height: 14px; transition: transform .15s; }
.gev-field[aria-expanded="true"] .gev-field-chev { transform: rotate(180deg); }
.gev-field.is-loading .gev-field-text { color: var(--gev-muted); }

/* ---------- calendar ---------- */
.gev-cal { position: relative; color: var(--gev-ink); font-family: inherit; -webkit-tap-highlight-color: transparent; }
.gev-cal button { font-family: inherit; }
.gev-body { position: relative; }
.gev-months { display: flex; gap: 32px; }
.gev-month { flex: 1 1 0; min-width: 0; }
.gev-title { height: 38px; line-height: 32px; text-align: center; font-size: 17px; font-weight: 500; padding: 0 36px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gev-cal--two .gev-title { padding: 0 40px; }

.gev-arrow {
    position: absolute; top: 0; z-index: 2; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; cursor: pointer;
}
.gev-arrow--prev { left: 0; }
.gev-arrow--next { right: 0; }
.gev-arrow::before {
    content: ""; position: absolute; top: 11px; width: 10px; height: 10px;
    border: solid var(--gev-ink); border-width: 0 2px 2px 0;
}
.gev-arrow--prev::before { left: 13px; transform: rotate(135deg); }
.gev-arrow--next::before { left: 9px; transform: rotate(-45deg); }
@media (hover: hover) { .gev-arrow:hover:not(:disabled) { background: #f2f2f2; } }
.gev-arrow:focus-visible { outline: 2px solid var(--gev-ink); }
/* no way back / forward: the arrow stays in its place, dimmed */
.gev-arrow:disabled { opacity: .25; cursor: default; }

.gev-wd { display: grid; grid-template-columns: repeat(7, 1fr); }
.gev-wd span { text-align: center; font-size: 12px; line-height: 28px; color: var(--gev-muted); }

/* rows of constant height (cell + 2px); the grid always keeps the room of 6 weeks, so the arrows never move */
.gev-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(var(--gev-rows, 6), var(--gev-row, calc(var(--gev-cell, 40px) + 2px)));
    height: calc(var(--gev-row, calc(var(--gev-cell, 40px) + 2px)) * 6);
    align-content: start;
}
.gev-day {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-width: 0; margin: 0; padding: 0; border: 0; background: transparent;
    font-size: 15px; line-height: 1; color: var(--gev-ink);
}
.gev-day > span {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: var(--gev-cell, 40px); height: var(--gev-cell, 40px); max-width: 100%; border-radius: 50%;
}
button.gev-day { cursor: pointer; }
.gev-day.is-avail > span { background: var(--gev-avail); font-weight: 700; }
/* hover: thin black ring as in the common picker, the circle stays */
@media (hover: hover) { .gev-day.is-avail:not(.is-selected):hover > span { box-shadow: inset 0 0 0 1px var(--gev-ink); } }
.gev-day:disabled { color: var(--gev-off); cursor: default; }
/* neighbour month: empty cells, the grid keeps its place */
.gev-day--out { visibility: hidden; }
/* today: underline, as on the venue page */
.gev-day.is-today:not(.is-selected) > span { box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }
.gev-day.is-selected > span, .gev-day.is-selected:hover > span { background: var(--gev-ink); color: #fff; font-weight: 700; box-shadow: none; }
.gev-day:focus-visible { outline: none; }
.gev-day:focus-visible > span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gev-ink); }
.gev-day.is-loading > span { animation: gev-pulse .8s ease-in-out infinite alternate; }
@keyframes gev-pulse { from { opacity: 1; } to { opacity: .45; } }
.gev-cal.is-busy .gev-day:not(.is-loading) { pointer-events: none; }

/* months with events: quick jump row (as in the city calendar) */
.gev-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.gev-chips::-webkit-scrollbar { display: none; }
.gev-chip {
    flex: 0 0 auto; border: 1px solid #cfcfcf; background: #fff; color: var(--gev-ink);
    border-radius: 999px; padding: 6px 14px; font-size: 14px; line-height: 20px; cursor: pointer;
}
.gev-chip:hover { border-color: var(--gev-ink); }
.gev-chip.is-active { background: var(--gev-ink); border-color: var(--gev-ink); color: #fff; }
.gev-chip.is-shown { border-color: var(--gev-ink); }

/* ---------- dialog: desktop modal, phone bottom sheet ---------- */
.gev-overlay { position: fixed; inset: 0; z-index: 1060; background: rgba(0, 0, 0, .45); }
.gev-dialog { position: fixed; z-index: 1061; background: #fff; color: var(--gev-ink); }
.gev-dialog--modal {
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 640px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto;
    border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); padding: 16px 20px 20px;
}
.gev-dialog--modal.gev-dialog--one { width: 400px; }
.gev-dialog--sheet {
    left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto;
    border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .2);
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
    --gev-cell: 44px;
    --gev-row: 46px;
}
.gev-dhead { display: flex; align-items: center; margin-bottom: 12px; }
.gev-dtitle { flex: 1 1 auto; font-size: 18px; font-weight: 500; }
.gev-close {
    flex: 0 0 auto; width: 40px; height: 40px; margin-right: -8px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--gev-ink); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.gev-close:hover { background: #f2f2f2; }
.gev-close svg { width: 20px; height: 20px; }
.gev-close svg path { stroke-width: 2.4; }
.gev-dialog--sheet .gev-chips { margin: 0 -16px; padding: 0 16px 12px; }
html.gev-lock, html.gev-lock body { overflow: hidden; }

/* ---------- performance page: always open ---------- */
/* [GCG-1593] the room is kept before the script builds the calendar, so nothing below jumps:
   6 rows + month chips 46 (34 + 12) + title 38 + weekdays 28 = 6 rows + 112px */
.gev-inline {
    --gev-cell: 40px;
    margin: 4px 0 8px;
    min-height: calc(var(--gev-row, calc(var(--gev-cell) + 2px)) * 6 + 112px);
}
@media (min-width: 768px) and (max-width: 991px) {
    .gev-inline { --gev-cell: 30px; }
    .gev-inline .gev-day { font-size: 13px; }
    .gev-inline .gev-title { font-size: 15px; }
}
@media (max-width: 767px) { .gev-inline { --gev-cell: 44px; --gev-row: 46px; } }
