/* JazzLink - single stylesheet for desktop, tablet and mobile */

:root { --font: "Titillium Web", TitilliumWebSemiBold, Arial, sans-serif; --accent: #C1272C; --accent-dark: #a32125;
        --ico-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
        --ico-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E"); }
html { width: 100%; overflow-x: hidden; }
body { background-color: #000; margin: 0; padding: 0; font-size: 100.01%; overflow-x: hidden;
       font-family: var(--font); font-weight: 600; color: #000; }

/* fixed background image */
body::after { content: " "; background: url("background.jpg") center top / cover no-repeat;
              position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1000; }

a { text-decoration: none; color: #000; }
ul { list-style: none; }
header, section, article, footer, p, h1, h2, h3, ul, div { margin: 0; padding: 0; }
header, section, article, footer, p, h1, h2, h3, ul { display: block; }
a, span, p, h1, h2, h3, input, select, option, label, button, textarea { font-family: inherit; font-weight: inherit; }
input, select, option, button { font-size: 1em; }
p { line-height: 18px; font-size: 1em; }
h1 { font-size: 2em; }
h2 { font-size: 1.75em; }

/* date inputs and dropdowns: black text on iOS, same look everywhere, own calendar icon */
input[type=date] { -webkit-appearance: none; appearance: none; position: relative; min-height: 1.4em; min-width: 0; max-width: 100%;
                   color: #000; -webkit-text-fill-color: #000; background: #fff var(--ico-calendar) no-repeat right 7px center / 16px 16px; padding-right: 28px; }
input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
.bar select, form.edit select { -webkit-appearance: none; appearance: none; color: #000; -webkit-text-fill-color: #000;
                                background: #fff var(--ico-chevron) no-repeat right 9px center / 12px 8px; padding-right: 28px; border-radius: 0; }

/* ---------- header / logo (top left) ---------- */
header { max-width: 964px; margin: 0 auto; padding: 18px 12px 0; box-sizing: border-box; }
#logo { display: inline-block; max-width: 100%; }
#logo img { display: block; width: 408px; max-width: 100%; height: auto; }

/* ---------- search ---------- */
.main { width: 964px; max-width: 100%; margin: 0 auto; padding: 0 12px; box-sizing: border-box; }
.finder > h1 { margin: 14px 0 12px; font-size: 1.8em; line-height: 1.08; color: #fff;
               text-shadow: 0 1px 2px #000, 0 2px 8px rgba(0,0,0,.95), 0 0 3px rgba(0,0,0,.8); }

.finder > .bar { position: relative; isolation: isolate; display: flex; align-items: center; gap: 8px; padding: 13px 0 11px; }
.finder > .bar::before, .serviceFunctions::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; z-index: -1;
                 background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bar_fields { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bar_row1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 10px; }
.bar_row1 > input, .bar_row1 > select { width: 100%; box-sizing: border-box; height: 30px; border: 0; padding-left: 6px; }
.bar_row2 { display: grid; grid-template-columns: auto 122px auto 122px; gap: 6px 8px; align-items: center; justify-content: start; }
.bar_row2 label { color: #ddd; }
.bar_row2 input { width: 122px; height: 30px; box-sizing: border-box; border: 0; padding-left: 6px; text-align: left; }
#submit { flex: 0 0 auto; width: 46px; height: 46px; border: 0; cursor: pointer; background-color: transparent; padding: 0;
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 33 34' fill='none' stroke='%23ddd' stroke-width='3.5' stroke-linecap='round'%3E%3Ccircle cx='13' cy='13' r='10'/%3E%3Cpath d='M21 21l10 11'/%3E%3C/svg%3E");
          background-repeat: no-repeat; background-position: center; background-size: 28px 29px; transition: background-size .2s; }
#submit:hover { background-size: 34px 35px; }
#submit:focus { outline: inherit; }

/* ---------- map ---------- */
#mapSection { margin: 15px 0 11px; }
#mapCanvas { width: 100%; height: 400px; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-popup-content { font: 600 .9rem/1.3 var(--font); color: #000; padding: 12px 14px; }
.maplibregl-popup-close-button { font-size: 20px; padding: 0 6px; color: #000; }
.popup { min-width: 200px; max-width: 290px; }
.popup-loc { padding: 0 16px 8px 0; margin-bottom: 8px; color: #000; border-bottom: 1px solid #ccc; }
.popup-list { max-height: min(210px, 38vh); overflow-y: auto; padding-right: 6px; }
.popup-item { display: block; padding: 8px 0; color: #000; text-decoration: none; border-top: 1px solid #ccc; }
.popup-item:first-child { border-top: 0; padding-top: 0; }
.popup-item:hover { text-decoration: none; color: #000; }
.popup-item strong { display: block; font-weight: 700; }
.popup-item span { display: block; }

/* ---------- workshop entries ---------- */
.main > article { display: flex; position: relative; margin-bottom: 10px; min-height: 103px; box-sizing: border-box;
                  background: rgba(255,255,255,.9) url("arrow_red.svg") no-repeat right 15px center / 33px 64px;
                  transition: background-color 300ms linear; }
.main > article:hover { background-color: rgba(255,255,255,1); background-image: url("arrow_red_hover.svg"); transition: background-color 100ms linear; }
.main > article.flash { background-color: #ffe9a8; }

.articleLeft { flex: 1 1 60%; min-width: 0; padding: 12px 18px 20px; box-sizing: border-box; }
.articleLeft > h2 { line-height: 32px; margin-bottom: 12px; color: #EF5400; }
.articleLeft > p { padding-bottom: 6px; }

/* location = red button with pin icon, below title and info text */
.infoLocation { position: relative; z-index: 300; display: inline-block; margin-top: 12px; padding: 5px 14px 5px 30px;
                background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74.83 90.33'%3E%3Cpath d='M63.42 10.52A37.41 37.41 0 0 0 10.55 63.44l.29.31.23.23 25.34 25.34 1 1 1-1L63.73 64l.28-.28.29-.3a37.42 37.42 0 0 0-.87-52.9zm-26 43.4a16.46 16.46 0 1 1 16.46-16.46 16.46 16.46 0 0 1-16.46 16.46z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 11px center / 11px 13px;
                color: #fff; border-radius: 3px; line-height: 20px; }
.infoLocation:hover { background-color: var(--accent-dark); text-decoration: none; cursor: pointer; }

.articleRight { flex: 0 0 32%; min-width: 240px; box-sizing: border-box; padding: 13px 70px 24px 24px; border-left: 1px solid #7F7F7F; margin: 1px 0 0; }

/* the whole entry (except the location) links to the workshop website */
.main > article > .overlay { position: absolute; inset: 0; z-index: 200; }

/* ---------- footer (dark like the filter block, links below each other) ---------- */
.serviceFunctions { position: relative; isolation: isolate; margin-top: 20px; color: #fff; }
.serviceFunctions > ul { max-width: 964px; margin: 0 auto; padding: 14px 12px; box-sizing: border-box; }
.serviceFunctions li { padding: 5px 0; }
.serviceFunctions a { color: #fff; }
.serviceFunctions a:hover { text-decoration: underline; }

/* generic white panel (imprint, privacy) */
.panel { background: #fff; padding: 18px; margin: 28px 0 10px; }
.panel h2 { color: #EF5400; margin-bottom: 12px; }
.panel p { margin-bottom: 10px; }
.panel a { color: #4272DB; }

/* ---------- tablet / mobile ---------- */
@media (max-width: 560px) {
  .bar_row1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  /* labels and fields below each other, fields aligned */
  .bar_row2 { grid-template-columns: auto minmax(0, 150px); }
}
@media (max-width: 720px) {
  .main > article { flex-direction: column; background-position: right 12px center; background-size: 22px 43px; }
  .articleLeft { padding: 12px 52px 8px 14px; }
  .articleLeft > h2 { line-height: 28px; margin-bottom: 8px; font-size: 1.4em; }
  .articleLeft > p { padding-bottom: 8px; }
  .articleRight { flex: none; min-width: 0; border-left: 0; padding: 0 52px 16px 14px; margin: 0; }
  #mapCanvas { height: 392px; }   /* 300px + the height of the former map headline */
}

/* ---------- admin (plain white look) ---------- */
body.plain { background: #fff; color: #222; font-weight: 400; }
body.plain::after { display: none; }
.plain a { color: #C1272C; }
.adminhead { max-width: none; margin: 0; padding: 10px 16px; background: #000 url("background.jpg") center 45% / cover; }
.adminhead img { display: block; width: 230px; max-width: 100%; height: auto; }
.plain main { max-width: 960px; margin: 0 auto; padding: 16px; }
.plain main.admin { max-width: 1500px; }
.plain button { background: #C1272C; color: #fff; border: 0; padding: 8px 16px; border-radius: 3px; cursor: pointer; }
.plain button:hover { background: #a32125; }
/* map zoom buttons keep their neutral look */
.plain .maplibregl-ctrl-group button { background-color: transparent; padding: 0; border-radius: 0; width: 29px; height: 29px; }
.plain .maplibregl-ctrl-group button:hover { background-color: rgba(0,0,0,.05); }

.adminbar { display: flex; flex-wrap: nowrap; gap: 16px; align-items: center; margin: 4px 0 12px; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
table.adm { border-collapse: collapse; font-size: .85rem; width: 100%; }
table.adm th, table.adm td { padding: 3px 8px; border-bottom: 1px solid #ccc; text-align: left; vertical-align: middle; line-height: 1.2; white-space: nowrap; }
table.adm th { background: #eee; position: sticky; top: 0; }
table.adm tr.row { cursor: pointer; scroll-margin-top: 20px; }
table.adm tr.row:hover { background: #fff6dd; }
table.adm tr.off td { color: #777; }
table.adm tr.nogeo td.c-city::after { content: " ⚠"; color: #b9770e; }
.cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools { display: flex; align-items: center; gap: 2px; }
.tools input[type=checkbox] { margin: 0 6px 0 0; }
.tools form { margin: 0; display: inline; }
.plain a.ico, .plain button.ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; background: none; color: #555; border-radius: 4px; }
.plain a.ico:hover, .plain button.ico:hover { background: #eee; color: #C1272C; }
.plain button.ico.del:hover { background: #fde8e8; color: #a32125; }

form.edit { max-width: 720px; padding: 4px 0 16px; }
form.edit label { display: block; margin: 12px 0 3px; font-weight: 700; }
form.edit input[type=text], form.edit input[type=date], form.edit select, form.edit textarea {
  width: 100%; box-sizing: border-box; padding: 9px; border: 1px solid #bbb; border-radius: 4px; font-size: 16px; line-height: 1.35; background-color: #fff; }
form.edit input[type=date] { padding-right: 32px; }
form.edit select { padding-right: 32px; }
form.edit textarea { resize: vertical; overflow: hidden; min-height: 40px; }   /* grows with the text (see script) */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.grid2 > div { min-width: 0; }
.edit-head { display: flex; justify-content: space-between; align-items: center; }
.edit-head h2 { margin: 0; font-size: 1.2rem; }
.plain a.closex { font-size: 1.4rem; padding: 4px 8px; color: #555; }
.geo-row { margin: 16px 0 10px; }
.hint { color: #666; font-size: .85rem; margin: 0 0 8px; }
.edit-actions { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.edit-actions button { padding: 11px 26px; font-size: 1rem; }
#map { height: 300px; margin: 8px 0; border-radius: 4px; }
.warn { color: #b9770e; }

@media (max-width: 720px) {
  .plain main { padding: 8px 10px; }
  .tablewrap { overflow-x: visible; }
  table.adm, table.adm tbody { display: block; }
  table.adm thead { display: none; }
  /* line 1: icons, line 2: title, line 3: dates / country / city - each line with ellipsis */
  table.adm tr.row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); padding: 3px 0; border-bottom: 1px solid #ccc; }
  table.adm td { display: block; border: 0; padding: 2px 6px; min-width: 0; }
  table.adm td.hide-sm { display: none; }
  table.adm td.c-tools, table.adm td.c-name { grid-column: 1 / -1; }
  table.adm td.c-name { font-weight: 700; }
  table.adm .cell { max-width: 100% !important; }
  table.adm .c-country .cell { max-width: 90px !important; }
  .edit-actions button { flex: 1; }
  #map { height: 280px; }
}
.plain span.ico { display: inline-block; width: 30px; height: 30px; }

/* admin: menu, SQL page */
.adminbar { gap: 14px; overflow-x: auto; }
.adminbar form { margin: 0; }
.sqlbox { width: 100%; box-sizing: border-box; min-height: 230px; padding: 10px; border: 1px solid #bbb; border-radius: 4px;
          font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre; overflow: auto; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chips input { width: 80px; padding: 5px; border: 1px solid #bbb; border-radius: 4px; font-size: 16px; }
.plain button.chip { background: #eee; color: #222; padding: 6px 12px; }
.plain button.chip:hover { background: #ddd; }
.res { margin: 14px 0; }
.res .stmt { font: 12px/1.3 ui-monospace, Menlo, Consolas, monospace; color: #555; margin-bottom: 4px; white-space: pre-wrap; word-break: break-word; }
.res .okmsg { color: #1d6b2f; font-weight: 700; }
.res .errmsg { color: #a32125; background: #fde8e8; padding: 8px 10px; border-radius: 4px; font-weight: 700; }
.res .null { color: #aaa; }
