.adv-overlay[hidden]{ display:none !important; }

.kv2-overlay,
.adv-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
}
.kv2-overlay.is-open,
.adv-overlay.is-open{ display:block; }

.kv2-modal,
.adv-dialog{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:min(920px, 92vw);
  max-height:min(92vh, 900px);
  overflow:auto;

  background:#121317;
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  box-shadow:0 30px 60px rgba(0,0,0,.45);
  padding:20px 22px;
}

.adv-head{ margin-bottom:12px; }
#adv-title{ margin:0 0 6px; font:700 20px/1.2 Inter, system-ui, sans-serif; }
.adv-intro{ margin:0; font:13px/1.45 Inter, system-ui, sans-serif; opacity:.85; }

.adv-x{
  position:absolute;
  top:10px;
  right:10px;
  width:36px;
  height:36px;
  border-radius:10px;
  display:grid;
  place-items:center;
  cursor:pointer;

  background:rgba(255,255,255,.06);
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
  z-index:2;
}
.adv-x:hover{ background:rgba(255,255,255,.12); }

.adv-grid{ display:grid; gap:16px; }

.adv-section{
  background:#1a1c22;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:12px 12px 14px;
}
.adv-section h4{
  margin:0 0 8px;
  font:700 15px/1.2 Inter, system-ui, sans-serif;
  padding-left:10px;
  position:relative;
}
.adv-section h4::before{
  content:"";
  position:absolute;
  left:0;
  top:2px;
  bottom:2px;
  width:4px;
  border-radius:3px;
  background:linear-gradient(180deg, var(--accent), var(--accent-700));
  opacity:.9;
}

#adv-city,
#adv-land,
#adv-formaat,
#adv-land-hol,
#adv-region,
#adv-holidays,
#adv-feastday,
#adv-from,
#adv-to,
#adv-center-city{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  background:#0f1014;
  color:#fff;
  border:1px solid rgba(255,255,255,.18);
  outline:0;
  transition:border-color .15s ease, box-shadow .15s ease;
}

#adv-city:focus,
#adv-land:focus,
#adv-formaat:focus,
#adv-land-hol:focus,
#adv-region:focus,
#adv-feastday:focus,
#adv-holidays:focus,
#adv-from:focus,
#adv-to:focus,
#adv-center-city:focus{
  border-color:rgba(var(--accent-rgb), .6);
  box-shadow:0 0 0 3px rgba(var(--accent-rgb), .25);
}

#adv-region:disabled,
#adv-holidays:disabled,
#adv-feastday:disabled{
  opacity:.6;
  cursor:not-allowed;
}

#adv-land,
#adv-formaat,
#adv-land-hol,
#adv-region,
#adv-feastday,
#adv-holidays{
  appearance:none;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23cccccc" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:14px;
}

.tiny.muted{ font-size:12px; opacity:.8; margin-top:6px; }

.form-row{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:10px;
  align-items:center;
}

.chk{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.range-out{ font-size:12px; opacity:.85; margin-left:8px; }

.adv-row2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.city-wrap{ position:relative; }
.adv-radius-center{ position:relative; }

.date-wrap{ position:relative; }
.date-clear{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
}
.date-clear:hover{ background:rgba(255,255,255,.12); }

.form-row.adv-inline{ align-items:start; }

.adv-inline-controls{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.adv-radius-toggle{ margin-top:2px; }

.adv-radius-controls{
  display:grid;
  grid-template-columns:220px 1fr auto;
  gap:10px;
  align-items:center;
}
#adv-radius{ width:100%; }

.adv-suggest{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:5010;

  background:#0f1014;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  max-height:260px;
  overflow:auto;
  box-shadow:0 14px 40px rgba(0,0,0,.4);
}

.adv-suggest .adv-city{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  color:#fff;
  padding:8px 10px;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.adv-suggest .adv-city:hover{ background:rgba(255,255,255,.06); }

.adv-city__name{ font-weight:600; }
.adv-city__meta{ opacity:.8; font-size:12px; }

.adv-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;

  position:sticky;
  bottom:0;
  background:linear-gradient(180deg, rgba(18,19,23,0), rgba(18,19,23,.92) 30%, rgba(18,19,23,1));
  padding:12px 0 6px;
}

.btn-primary{
  background:var(--accent);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
}
.btn-primary:hover{ filter:brightness(1.1); }

.btn-ghost{
  background:transparent;
  border:1px solid rgba(255,255,255,.2);
  color:#fff;
}

@media (max-width: 820px){
  .adv-row2{ grid-template-columns:1fr; }
  .adv-radius-controls{ grid-template-columns:1fr; align-items:stretch; }
  .range-out{ margin-left:0; }
}

@media (max-width: 600px){

  .adv-dialog{
    inset:0;
    top:0;
    left:0;
    right:0;
    bottom:0;
    transform:none;

    width:100vw;
    height:100dvh;
    max-height:none;
    border-radius:0;
    padding:14px 14px 86px;
  }

  .adv-head{ margin-bottom:10px; }
  #adv-title{ font-size:18px; }
  .adv-intro{ font-size:12.5px; }

  .adv-x{
    width:34px;
    height:34px;
  }

  .adv-grid{ gap:12px; }

  .adv-section{
    padding:10px 10px 12px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.07);
  }
  .adv-section h4{
    font-size:14px;
    margin-bottom:6px;
  }

  .form-row{
    grid-template-columns:1fr;
    gap:6px;
    align-items:stretch;
  }
  .form-row > span{
    font-size:12px;
    opacity:.85;
    padding-left:2px;
  }

  #adv-city,
  #adv-land,
  #adv-formaat,
  #adv-land-hol,
  #adv-region,
  #adv-holidays,
  #adv-feastday,
  #adv-from,
  #adv-to,
  #adv-center-city{
    padding:9px 10px;
    font-size:14px;
  }
  .tiny.muted{ font-size:11.5px; }

  .form-row.adv-inline{
    grid-template-columns:1fr !important;
    align-items:stretch;
  }
  .adv-inline-controls{ width:100%; }
  .chk.adv-radius-toggle{ width:100%; }

  .adv-actions{
    position:fixed;
    left:0;
    right:0;
    bottom:0;

    padding:10px 14px 14px;
    gap:10px;
    justify-content:space-between;
    border-top:1px solid rgba(255,255,255,.08);
    background:rgba(18,19,23,.96);
    backdrop-filter:blur(8px);
  }
  .adv-actions .btn-ghost,
  .adv-actions .btn-primary{
    width:100%;
    padding:11px 14px;
    border-radius:12px;
    font-size:14px;
  }
}
