/* Τένις Ύδρας: Ανακοινώσεις. On top of the site's stylesheet: its tokens (.tx, day and night) and the booking page's shared
   parts (.bk-btn, .bk-input, .bk-ta, .bk-opt, .bk-fs, .bk-info, .bk-err, .av). The pinned announcements are in the announcement's sand,
   like the band on the home page and the closed days of the booking page; the rest are rows on the paper, newest first.
   Signed in as the Municipality: the box to write a new announcement, a menu on each one, the editor in place.
   From the design's notices.css, without the parts of pages not built yet (the admin strip and switch, the closure
   toggle and dates, the home page in small) and without the line that brought a deleted announcement back. */

/* ---------------------------------------------------------------- the page */
.an{padding:24px 0 56px}
@media (min-width:960px){.an{padding:44px 0 88px}}
.an-in{display:grid;gap:28px;max-width:1180px;margin:0 auto}
@media (min-width:960px){.an-in{gap:36px}}
.an-head{display:grid;gap:10px}
.an-title{font-family:'GFS Didot',Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(2.2rem,1.75rem + 1.5vw,3.2rem);line-height:1;letter-spacing:-.005em;text-wrap:balance}
.an-lead{max-width:50ch;font-size:1.02rem;line-height:1.5;color:var(--muted);text-wrap:pretty}
@media (min-width:960px){.an-head{grid-template-columns:auto minmax(0,1fr);align-items:end;column-gap:56px}.an-lead{padding-bottom:3px}}

/* the groups: the pinned ones (the one on the home page first), then the rest, newest first */
.an-group{display:grid;gap:12px;min-width:0}
.an-list{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.an-group[data-g="rest"] .an-list{gap:0;border-top:1px solid var(--line-2)}
.an-group[data-g="rest"] .an-item{border-bottom:1px solid var(--line)}
.an-group[data-g="rest"] .an-item[data-mode="edit"]{padding:16px 0;border-bottom-color:transparent}
.an-item{position:relative;min-width:0}

/* an announcement: when, then the title; from 960px the text beside it (the band's two columns) */
.an-n{position:relative;display:grid;gap:8px;padding:20px 0 22px;scroll-margin-top:24px}
.an-n-main{display:grid;gap:8px;align-content:start;min-width:0}
.an-n-side{display:grid;gap:12px;align-content:start;justify-items:start;min-width:0}
.an-k{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;font-size:13.5px;line-height:1.35;color:var(--muted);font-variant-numeric:lining-nums}
.an-dot{opacity:.7}
.an-pin{display:inline-flex;align-items:center;gap:6px;font-weight:650;color:var(--closed);transition:color 1.2s}
.an-pin .tx-ico{width:16px;height:16px}
.an-h{font-family:'GFS Didot',Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(1.4rem,1.28rem + .5vw,1.7rem);line-height:1.16;color:var(--ink);text-wrap:balance;overflow-wrap:anywhere}
.an-text{max-width:62ch;font-size:15.5px;line-height:1.6;color:var(--ink);white-space:pre-line;text-wrap:pretty;overflow-wrap:anywhere}
@media (min-width:960px){
  .an-n{grid-template-columns:minmax(0,5fr) minmax(0,6fr);column-gap:48px;padding:26px 0 28px}
  .an-n-side{padding-top:26px}
}
/* pinned: in the announcement's sand */
.an-item[data-pinned="true"] .an-n{padding:20px 18px 22px;border-radius:18px;background:var(--closed-bg);box-shadow:inset 0 0 0 1px var(--closed-line);transition:background-color 1.2s,box-shadow 1.2s}
.an-item[data-pinned="true"] .an-h{font-size:clamp(1.55rem,1.3rem + .9vw,2.05rem);line-height:1.12}
@media (min-width:960px){.an-item[data-pinned="true"] .an-n{padding:28px 32px 30px}.an-item[data-pinned="true"] .an-n-side{padding-top:28px}}
/* the announcement the page opens at (after a change, or from a copied link): a ring that fades */
.an-n:target{animation:an-flash 1.8s cubic-bezier(.3,.6,.3,1)}
@keyframes an-flash{0%,25%{outline:2px solid var(--accent);outline-offset:6px}100%{outline:2px solid transparent;outline-offset:6px}}

/* older announcements, and a page with none */
.an-older{justify-self:center;margin-top:12px}
.an-older .tx-ico{width:18px;height:18px}
.an-empty{display:grid;gap:6px;padding:26px 0 8px;border-top:1px solid var(--line-2)}
.an-empty h3{font-size:17px;font-weight:650;line-height:1.3}
.an-empty p{max-width:52ch;font-size:15px;line-height:1.5;color:var(--muted);text-wrap:pretty}

/* ---------------------------------------------------------------- signed in as the Municipality */
/* the box to write a new announcement, as on any social network: a link to the editor */
.an-compose{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;padding:12px;border-radius:20px;background:var(--card);box-shadow:var(--shadow-s);transition:background-color 1.2s}
.an-compose>.av{width:44px;height:44px;font-size:14px}
.an-go{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;min-height:50px;margin:0;padding:0 7px 0 18px;border:0;border-radius:999px;background:var(--soft);color:var(--muted);font:inherit;font-size:15.5px;line-height:1.3;text-align:left;cursor:pointer;transition:box-shadow .15s,background-color 1.2s}
.an-go:hover{box-shadow:inset 0 0 0 1px var(--line-2)}
.an-go>span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.an-go-pen{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--btn);color:var(--btn-ink);transition:background-color .2s}
.an-go:hover .an-go-pen{background:var(--btn-hover)}
.an-go-pen .tx-ico{width:17px;height:17px}
.tx .an-go:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.an-go{text-decoration:none}

/* on each announcement: the menu button (top right), what only the Municipality sees under the text */
.an-n[data-admin="true"] .an-k{padding-right:40px}
@media (min-width:960px){.an-n[data-admin="true"] .an-k{padding-right:0}.an-n[data-admin="true"]{padding-right:56px}.an-item[data-pinned="true"] .an-n[data-admin="true"]{padding-right:76px}}
.an-acts{position:absolute;top:10px;right:-12px;z-index:2}
.an-acts[data-open="true"]{z-index:20}
.an-item[data-pinned="true"] .an-acts{top:8px;right:6px}
@media (min-width:960px){.an-acts{top:17px}.an-item[data-pinned="true"] .an-acts{top:16px;right:14px}}
.an-dots{position:relative;z-index:2;display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:0;border-radius:999px;background:none;color:var(--muted);cursor:pointer;transition:background-color .15s,color .15s;-webkit-tap-highlight-color:transparent}
.an-dots:hover,.an-dots[aria-expanded="true"]{background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink)}
.an-dots svg{width:20px;height:20px}
.tx .an-dots:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.an-scrim{position:fixed;inset:0;z-index:1;display:block;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;cursor:default;-webkit-appearance:none;appearance:none}
.an-menu{position:absolute;top:calc(100% + 4px);right:4px;z-index:3;display:grid;gap:2px;width:min(276px,calc(100vw - 40px));padding:6px;border-radius:16px;background:var(--card);box-shadow:0 22px 48px -16px rgba(9,20,42,.36),0 4px 12px -4px rgba(9,20,42,.12),0 0 0 1px var(--line);transform-origin:calc(100% - 18px) 0;animation:an-pop .18s cubic-bezier(.2,.8,.2,1) both}
.tx[data-theme="night"] .an-menu{box-shadow:0 28px 64px -16px rgba(0,0,0,.7),0 0 0 1px rgba(195,210,236,.16)}
.an-menu button{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:12px;width:100%;min-height:44px;margin:0;padding:0 12px;border:0;border-radius:10px;background:none;color:var(--ink);font:inherit;font-size:15px;font-weight:550;line-height:1.25;text-align:left;cursor:pointer}
.an-menu button:hover{background:var(--soft)}
.an-menu .tx-ico{width:19px;height:19px;color:var(--muted)}
.an-menu form{display:contents}
.an-menu hr{height:1px;margin:4px 10px;border:0;background:var(--line)}
.an-menu .an-danger,.an-menu .an-danger .tx-ico{color:var(--danger)}
.tx .an-menu button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
@keyframes an-pop{from{opacity:0;transform:translateY(-4px) scale(.97)}}
.an-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:13.5px;line-height:1.35;color:var(--muted)}
.an-meta>span{display:inline-flex;align-items:center;gap:7px}
.an-meta .tx-ico{width:16px;height:16px}
.an-ok{color:var(--ok-ink);font-weight:600}

/* ---------------------------------------------------------------- the editor: in the box's place (a new announcement) or the announcement's (changes) */
@keyframes bk-fade{from{opacity:0}to{opacity:1}}
.an-ed{display:grid;border-radius:20px;background:var(--card);box-shadow:var(--shadow);animation:bk-fade .22s ease-out both;transition:background-color 1.2s}
.an-ed-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 8px 4px 20px}
.an-ed-h{font-family:'GFS Didot',Georgia,'Times New Roman',serif;font-weight:400;font-size:1.6rem;line-height:1.1}
.an-ed-grid{display:grid;gap:26px;padding:12px 20px 22px}
.an-ed-main,.an-ed-side{display:grid;gap:18px;align-content:start;min-width:0}
@media (min-width:960px){
  .an-ed-top{padding:16px 12px 6px 28px}
  .an-ed-grid{grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:0;padding:6px 0 0}
  .an-ed-main{padding:8px 28px 28px}
  .an-ed-side{padding:8px 28px 28px;border-left:1px solid var(--line)}
}
.an-ed-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px 18px;padding:14px 20px 18px;border-top:1px solid var(--line)}
.an-ed-foot .bk-note{flex:1 1 260px;min-width:0}
.an-ed-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
@media (min-width:600px){.an-ed-btns{display:flex;width:auto}.an-ed-btns .bk-btn{min-width:132px}}
@media (min-width:960px){.an-ed-foot{padding:16px 28px 20px}}
.an-field{display:grid;gap:8px;min-width:0}
.an-frow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px}
.an-count{margin-top:-2px;font-size:12.5px;font-weight:600;line-height:1.3;color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}
/* the title is typed in the title's face */
.an-tin{font-family:'GFS Didot',Georgia,'Times New Roman',serif;font-size:1.32rem;line-height:1.2}
.an-ta{min-height:136px;max-height:460px;line-height:1.55;field-sizing:content}
.tx[data-theme="night"] .bk-input[type="date"]{color-scheme:dark}
/* Ελληνικά / English: the Greek is the announcement, the English optional */
.an-tabs{display:inline-flex;gap:2px;padding:3px;border-radius:999px;background:var(--soft)}
.an-tabs button{position:relative;display:inline-flex;align-items:baseline;gap:6px;min-height:34px;margin:0;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--muted);font:inherit;font-size:13.5px;font-weight:650;line-height:34px;cursor:pointer;transition:background-color .15s,color .15s}
.an-tabs button::after{content:"";position:absolute;inset:-5px 0}
.an-tabs button[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(9,20,42,.14)}
.an-tabs small{font-size:12px;font-weight:500}
.tx .an-tabs button:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
/* where it shows: two choices, each with a small picture of where */
.an-opts{display:grid;gap:8px}
.bk-opt.an-opt{grid-template-columns:44px minmax(0,1fr);column-gap:14px;row-gap:2px;padding:10px 42px 10px 12px}
.an-pic{grid-row:span 2;align-self:center;width:44px;height:36px;color:var(--muted);transition:color .15s}
.an-opt[data-on="true"] .an-pic{color:var(--accent)}
/* until when it stays at the top */
.bk-fs.an-until{gap:6px}
.an-r{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:15px;line-height:1.3;color:var(--ink);cursor:pointer}
.an-r input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--btn);cursor:pointer}
.an-r-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.an-r-row .bk-input{width:auto;min-width:0;min-height:44px;padding:8px 12px;font-size:15px}
.an-until .bk-note{margin-top:2px}
@media (prefers-reduced-motion:reduce){.an *,.an *::before,.an *::after{animation:none!important;transition:none!important}}
