:root{
  --ht-offset-bottom: 78px;   /* iznad footer menija */
  --ht-offset-right: 4px;     /* skroz desno */
  --ht-size: 52px;
  --ht-gap: 10px;
  --ht-radius: 18px;

  --ht-color: #cf6d17;/*#00b3a4; */      /* Mediterranean Teal */
  --ht-hover: #b85f13;
}

/* ===== FLOAT WRAPPER ===== */
 .ht-float-wrap{
	 position: fixed; 
	 right: var(--ht-offset-right); 
	 bottom: var(--ht-offset-bottom); 
	 display: flex; 
	 flex-direction: column; 
	 gap: var(--ht-gap); z-index: 99999; 
}

/* poziv sakriven po defaultu */
.ht-float-wrap a[href^="tel:"]{
  display: none;
}

/* poziv vidljiv samo na telefonu */
@media (max-width: 767px){
  .ht-float-wrap a[href^="tel:"]{
    display: grid;
  }
}

/* ===== BUTTON ===== */
.ht-float-btn{
  width: var(--ht-size);
  height: var(--ht-size);
  border-radius: var(--ht-radius);
  border: none;
  background: var(--ht-color);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 32px rgba(0,0,0,.35);
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, box-shadow .2s ease;
}

.ht-float-btn:hover{
  transform: translateY(-3px);
  background: var(--ht-hover);
 box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.ht-float-btn:active{
  transform: scale(.95);
}

.ht-float-btn svg{
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

/* ===== MODAL OVERLAY ===== */
.ht-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  z-index: 99998;
}

/* ===== MODAL ===== */
.ht-modal{
  position: fixed;
  right: 12px;
  bottom: calc(var(--ht-offset-bottom) + 110px);
  width: min(420px, calc(100vw - 24px));
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  display: none;
  z-index: 99999;
  overflow: hidden;
}

.ht-modal-head{
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.ht-modal-head b{
  font-size: 16px;
}

.ht-x{
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

/* ===== FORM ===== */
.ht-modal-body{
  padding: 20px;
}

.ht-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ht-span-2{
  grid-column: span 2;
}

.ht-field label{
  font-size: 12px;
  margin-bottom: 4px;
  display: block;
  opacity: .7;
}

.ht-field input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  font-size: 14px;
  transition: border .15s ease, box-shadow .15s ease;
}

.ht-field input:focus{
  border-color: var(--ht-color);
  box-shadow: 0 0 0 3px rgba(0,179,164,.18);
  outline: none;
}

.ht-actions{
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.ht-btn{
  flex: 1;
  padding: 12px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.ht-btn.primary{
  background: #10225f;   /* uklapa se sa header plavom */
  color: #fff;
}

.ht-btn.ghost{
  background: rgba(0,0,0,.06);
}

.ht-msg{
  margin-top: 10px;
  font-size: 12px;
  display: none;
}

.ht-msg.err{ color:#b00020; }
.ht-msg.ok{ color:#0b6b3a; }
.ht-ages-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ht-age-select{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,.5) 50%),
    linear-gradient(135deg, rgba(0,0,0,.5) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.ht-age-select:focus{
  outline: none;
  border-color: rgba(0,0,0,.35);
}
  



/* FIX: da se tekst u select poljima ne seče */
.ht-age-select{
  width: 100%;
  height: 48px;              /* ključna linija */
  line-height: 48px;         /* vertikalno centriranje teksta */
  padding: 0 44px 0 14px;     /* desno ostavi mesta za strelicu */
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  font-size: 14px;
  color: #111;
  box-sizing: border-box;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* custom strelica */
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,.55) 50%),
    linear-gradient(135deg, rgba(0,0,0,.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* placeholder "Obavezno" da bude vidljiv */
.ht-age-select option[disabled]{
  color: rgba(0,0,0,.55);
}



/* === FIX: modal mora imati unutrašnji scroll na telefonu === */

.ht-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 120px); /* ostavlja prostor gore/dole */
  display: none;
  overflow: hidden; /* bitno: body scroll ide u .ht-modal-body */
  border-radius: 22px;
  z-index: 99999;
}

/* Na manjim ekranima spusti modal malo niže i računaj footer meni */
@media (max-width: 520px){
  .ht-modal{
    top: auto;
    bottom: 86px;              /* podignuto zbog tvog footer menija */
    transform: translateX(-50%);
    max-height: calc(100vh - 110px);
  }
}

/* Header uvek vidljiv */
.ht-modal-head{
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Ovo je ključno: telo modala skroluje */
.ht-modal-body{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 220px); /* prilagodi ako ti treba */
  padding-bottom: 12px;
}

/* Kad se modal otvori, zaključaj pozadinu, ali ne i modal */
body.ht-modal-open{
  overflow: hidden;
  height: 100%;
}

/* Malo prostora ispod dugmadi da se ne “lepe” uz dno */
.ht-actions{
  padding-bottom: 8px;
}

/* === Desktop + mobile: modal scroll fix === */

.ht-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 140px);
  display: none;
  overflow: hidden;         /* bitno */
  z-index: 99999;

  /* ključno */
  display: none;            /* ostaje */
  flex-direction: column;   /* radi sa header/body */
}

.ht-modal.is-open {
  display: flex;            /* kad otvoriš modal */
}

.ht-modal-head {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ht-modal-body {
  flex: 1 1 auto;
  overflow: auto;                 /* ključno */
  -webkit-overflow-scrolling: touch;
  min-height: 0;                  /* ključno za flex scroll (desktop) */
  padding-bottom: 12px;
}

/* opcionalno: da date picker/inputs ne "seku" */
.ht-modal-body input,
.ht-modal-body select {
  max-width: 100%;
}

/* Mobile: podigni zbog footer menija */
@media (max-width: 520px){
  .ht-modal{
    top: auto;
    bottom: 86px;
    transform: translateX(-50%);
    max-height: calc(100vh - 110px);
  }
}



/* =========================
   HANTRAVEL MODAL FIX
   Desktop scroll + veći prozor
   ========================= */

.ht-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 120px);

  background: #fff;
  border-radius: 24px;
 /* box-shadow: 0 25px 60px rgba(0,0,0,0.25);*/

  overflow: hidden;
  z-index: 99999;

  display: none;
  flex-direction: column;
}

.ht-modal.is-open{
  display:flex;
}

/* Header ostaje vidljiv */
.ht-modal-head{
  flex:0 0 auto;
  position:sticky;
  top:0;
  z-index:2;
}

/* telo modala skroluje */
.ht-modal-body{
  flex:1 1 auto;
  overflow:auto;
  min-height:0;
  padding:28px;

  -webkit-overflow-scrolling: touch;
}

/* grid forme */
.ht-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.ht-span-2{
  grid-column:span 2;
}

/* zakljucava pozadinu kad je modal otvoren */
body.ht-modal-open{
  overflow:hidden;
}

/* veći modal na velikim ekranima */
@media (min-width:1200px){

  .ht-modal{
    width:980px;
  }

}

/* mobile prilagođavanje zbog footer menija */
@media (max-width:520px){

  .ht-modal{
    top:auto;
    bottom:86px;
    transform:translateX(-50%);
    max-height:calc(100vh - 110px);
    width:calc(100vw - 24px);
  }

}

/* =========================
   FINAL DESKTOP FIX
   Veća visina + unutrašnji scroll
   Zalepi na KRAJ fajla
   ========================= */

@media (min-width: 768px) {

  /* modal: stvarna visina (ne max-height) */
  .ht-modal {
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;

    width: min(1000px, calc(100vw - 40px)) !important;
    height: calc(100vh - 60px) !important;     /* <-- veća visina */
    max-height: none !important;

    overflow: hidden !important;
    flex-direction: column !important;
  }

  /* kad se otvori: flex */
  .ht-modal.is-open {
    display: flex !important;
  }

  /* telo modala: skrol */
  .ht-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    max-height: none !important;
    padding: 28px !important;
  }
}

/* Ako JS još uvek koristi display:block, ovo ga pretvara u flex */
@media (min-width: 768px) {
  .ht-modal[style*="display: block"] {
    display: flex !important;
  }
}
