/* ===========================
   SkúsSiTo — unified styles
   =========================== */

   :root{
    /* Base palette */
    --bg: #0b0f14;
    --fg: #e8ecf1;
    --muted: #9aa7b5;
  
    /* Surface + borders */
    --surface-card: #0f141b;                 /* vnútro (dropboxy, info karty) */
    --surface-band: rgba(255,255,255,.035);  /* jemný „band“ za sekciami */
    --border: rgba(255,255,255,.08);
    --divider: rgba(255,255,255,.10);
  
    /* Brand / actions */
    --primary: #3b82f6;      /* hlavná (tlačidlá, CTA) */
    --primary-2: #61a6ff;    /* gradient top */
    --shadow-soft: 0 8px 22px rgba(0,0,0,.28);
    --shadow-card: 0 6px 18px rgba(0,0,0,.30);
  }
  
  /* ===== Reset / base ===== */
  *{ box-sizing:border-box }
  html,body{ height:100% }
  body{
    margin:0; color:var(--fg);
    font: 16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,"Inter",Arial,sans-serif;
    /* 1 jemný gradient + plná farba (žiadne fľaky) */
    background:
      radial-gradient(1000px 600px at 50% -20%, #121a28 0%, transparent 60%),
      var(--bg);
  }
  
  /* ===== Header ===== */
  .site-header{
    position: sticky; top:0; z-index:50;
    background: linear-gradient(to bottom, rgba(11,15,20,.85), rgba(11,15,20,.20));
    backdrop-filter: saturate(1.05) blur(6px);
  }
  .header-inner{
    max-width: 1180px;       /* širšie na desktope */
    margin:0 auto; padding:10px 22px;
    display:flex; align-items:center; justify-content:space-between;
  }
  .brand-logo{ height: clamp(28px, 6vw, 64px); width:auto; display:block }
  .how-link:hover{ text-decoration:underline }
  .header-right .cta-btn{
    margin: 10px;
    padding: 8px 18px;
    font-size: .9rem;
  }
  
  
  /* ===== Layout container ===== */
  .container{
    max-width: 1180px;       /* pôvodných 980 -> viac „air“ */
    margin:0 auto; 
    padding: 18px 22px 24px;
  }
  
  /* ===== Hero ===== */
  .hero{
    text-align:center; margin-top:8px;
    background: var(--surface-band);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 16px 14px;
    box-shadow: var(--shadow-soft);
  }
  .hero h1{ margin:10px 0 6px; font-size: clamp(22px, 4.4vw, 36px) }
  .subtitle{ color:var(--muted); margin:0 auto 14px; max-width: 56ch }
  
  /* ===== Upload section ===== */
  .uploader{
    margin-top: 14px;
    background: var(--surface-band);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px 16px;
    box-shadow: var(--shadow-soft);
  }
  .dropzones{
    display:grid; gap:12px;
    grid-template-columns: 1fr 1fr;
  }
  .dropzone{
    position:relative;
    background: var(--surface-card);
    border:1px dashed var(--border);
    border-radius:16px;
    overflow:hidden;
    transition: box-shadow .25s ease, transform .2s ease;
    height: 28vh;            /* mob: menšie, aby bolo vidieť Generate */
    min-height:210px; 
    max-height:340px;
  }
  .dropzone:hover{
    box-shadow: 0 10px 26px rgba(0,0,0,.34);
    transform: translateY(-1px);
    cursor: pointer;
  }
  .dz-inner{
    position:absolute; inset:0;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; padding:16px; color:var(--muted);
  }
  .dz-icon{ font-size:28px; margin-bottom:8px; opacity:.9 }
  .dz-title{ color:var(--fg); font-weight:600; margin-bottom:4px }
  .dz-hint{ font-size:.9rem; opacity:.9 }
  
  /* Preview – vždy celý obrázok (bez cropu) */
  .preview{
    position:absolute; inset:0; width:100%; height:100%;
    object-fit: contain; object-position:center; display:none; background:#0f1116;
  }
  
  /* ===== Actions ===== */
  .actions{ display:flex; justify-content:center; margin: 12px 0 0 }
  .btn-generate{
    appearance:none; border:0; cursor:pointer;
    background: linear-gradient(180deg, var(--primary-2), var(--primary));
    color:#fff; font-weight:700; letter-spacing:.2px;
    padding: 15px 26px; border-radius:14px;
    box-shadow: 0 10px 24px rgba(59,130,246,.40);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    font-size: 1.08rem;
  }
  .btn-generate[aria-disabled="true"]{ opacity:.6; cursor:not-allowed }
  .btn-generate:not([aria-disabled="true"]):hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(59,130,246,.46);
  }
  
  /* ===== Info split (pod Generate) ===== */
  .info-split{
    margin-top: 18px;
    background: var(--surface-band);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
    display:grid; gap:16px;
    grid-template-columns: 1fr;   /* mobile: 1 stĺpec */
  }
  .info-box{
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 18px 8px;
    box-shadow: var(--shadow-card);
  }
  .info-box h2{ margin:0 0 12px }
  .steps, .policy{
    margin:0; padding:0; list-style:none;
  }
  
  .steps li{
    display:flex; align-items:flex-start;
    gap:10px;                       /* medzera medzi emoji a textom */
    padding:12px 0;                 /* vertikálny priestor */
    border-bottom:1px solid var(--divider);
    font-size:1rem;
  }
  .steps li:last-child{ border-bottom:0 }
  
  
  /* ===== CTA footer (rovnaká farba ako Generate) ===== */
  .cta-footer{ margin-top: 18px; background: #0f1622 }
  .cta-inner{
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 22px 32px;   /* was 18px 22px 32px */
    text-align: center;
  }
  
  .cta-inner p{
    margin: 12px 0 18px;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 2rem); 
    /* min 1.2rem, ideálne 2.5% šírky viewportu, max 2rem */
  }
  
  
  .cta-btn{
    display:inline-block; text-decoration:none; color:#fff; font-weight:600;
    background: linear-gradient(180deg, var(--primary-2), var(--primary));
    padding:10px 22px; border-radius:999px;
    box-shadow: 0 10px 24px rgba(59,130,246,.40);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  }
  .cta-btn:hover{ transform: translateY(-2px); box-shadow: 0 14px 28px rgba(59,130,246,.46); }
  
  /* ===== Desktop tweaks ===== */
  @media (min-width: 900px){
    .container{ padding: 22px 22px 36px } /* was bottom: 80px */
    .dropzones{ gap:16px }
    .dropzone{ height: 44vh; max-height:520px; min-height:280px }
    .actions{ margin: 14px 0 4px }
    .btn-generate{ font-size:1.14rem; padding:16px 30px }
    .info-split{ grid-template-columns: 1fr 1fr }
  }
  

  /* === GDPR / Policy list (nezávislé od .steps) === */
.policy{
  margin: 0;
  padding: 6px 0 2px;      /* jemný vnútorný „air“ */
  list-style: none;
  color: var(--fg);
  opacity: .95;
}

.policy li{
  padding: 10px 0;         /* vertikálny priestor medzi riadkami */
  border-bottom: 1px solid var(--divider);
  line-height: 1.55;
}

.policy li:last-child{
  border-bottom: 0;
}

/* Voliteľné: ak chceš pred textom ikonu štítu, pridaj na <ul> aj class "policy--icons" */
.policy.policy--icons li{
  padding-left: 26px;      /* miesto pre ikonu */
  position: relative;
}
.policy.policy--icons li::before{
  content: "🛡️";
  position: absolute;
  left: 0;
  top: 10px;               /* zarovnanie s textom */
  font-size: 0.95rem;
  opacity: .9;
}

/* Zobraziť náhľad, skryť hinty po nahraní súboru */
.dropzone.has-file .preview{
  display: block !important;      /* prebiť default display:none */
}

.dropzone.has-file .dz-inner{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease;
}

/* ===== Result modal ===== */
.modal-overlay{
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
}
.modal-backdrop{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px) saturate(1.1);
}
.modal-card{
  position: relative;
  width: min(96vw, 1100px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  padding: 14px;
  overflow: hidden;
  animation: modal-pop .16s ease-out;
}
@keyframes modal-pop{ from{ transform: scale(.98); opacity:.6 } to{ transform: none; opacity:1 } }

.modal-body{
  position: relative;
  background: #0e1117;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: grid; place-items: center;
}

/* výsledný obrázok – vždy celý; plynulé nahratie */
.result-image{
  max-width: 100%;
  max-height: 80vh;
  width: auto; height: auto;
  object-fit: contain;
  opacity: 0; transition: opacity .2s ease;
}
.result-image[src]{ opacity: 1; }

/* Zoom na klik – prepína sa class .zoomed */
.result-image.zoomed{
  max-height: none; height: auto; width: auto;
  cursor: zoom-out;
}
.result-image:not(.zoomed){ cursor: zoom-in; }

/* Error krabička (ak niečo zlyhá) */
.error-box{
  color: #ffd7d7;
  background: #3a1f1f;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 12px 14px;
  max-width: 70ch;
}

/* Tlačidlá v modale – líniové, ladia s témou */
.modal-actions{
  display: flex; gap: 10px; justify-content: flex-end;
}
.btn-line{
  appearance: none; border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--fg); padding: 10px 14px;
  border-radius: 12px; cursor: pointer;
  transition: background .15s ease, transform .15s ease, border-color .15s;
}
.btn-line:hover{ background: rgba(255,255,255,.07); transform: translateY(-1px); }
.btn-line:active{ transform: translateY(0); }

/* Progress (ak ho používaš pri generovaní) – decentný */
.progress-wrap{
  display: grid; gap: 6px; justify-items: center;
  margin-top: 10px;
}
.progress{
  width: 220px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.06); overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar{
  height: 100%;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  width: 35%;
}
.progress-indeterminate{
  animation: ind 1.1s linear infinite;
}
@keyframes ind{
  0%{ transform: translateX(-100%) }
  100%{ transform: translateX(300%) }
}
.progress-label{ font-size:.9rem; color: var(--muted) }

/* tlačidlo X na vymazanie */
.btn-clear{
  position:absolute;
  top:8px; right:8px;
  width:36px;               /* larger circle */
  height:36px;
  border:none; border-radius:50%;
  background: rgba(0,0,0,.55);
  color:#fff; 
  font-size:20px;           /* bigger “×” character */
  line-height:1;
  cursor:pointer; display:none;
  align-items:center; justify-content:center;
}

.dropzone.has-file .btn-clear{ display:flex; }
.btn-clear:hover{ background: rgba(0,0,0,.75); }

.contact-link {
  color: #0EA5E9;           
  text-decoration: none;    
  font-weight: 500;         
  cursor: pointer;
}

.contact-link:hover {
  text-decoration: underline;
}


/* Make logo bigger on small screens (phones) */
@media (max-width: 768px) {
  .brand-logo {
    height: clamp(30px, 12vw, 40px); /* was 28–64px */
  }
}

/* --- Header top spacing: bigger + responsive --- */
.site-header{
  /* keep your existing props; just add/override the paddings */
  padding-top: calc(env(safe-area-inset-top, 0px) + 22px);
  padding-bottom: 12px;
}

/* phones: a bit tighter so it doesn't push content too far down */
@media (max-width: 480px){
  .site-header{
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    padding-bottom: 10px;
  }
}

/* tablets and up: a bit more breathing room */
@media (min-width: 900px){
  .site-header{
    padding-top: calc(env(safe-area-inset-top, 0px) + 30px);
    padding-bottom: 14px;
  }
}

/* optional: keep logo size elegant as spacing grows */
.brand-logo{
  height: clamp(40px, 6vw, 64px);
}

/* ===== Local gallery – match info-box look ===== */
.gallery-section{
  /* match .info-box */
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px 12px;
  box-shadow: var(--shadow-card);

  /* spacing like items inside .info-split */
  margin-top: 16px;
}

.gallery-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin:0 0 12px;
}

.gallery-head h2{
  margin:0; font-size:1.25rem; font-weight:800;
}

.gallery-actions .btn-line{
  padding:8px 12px; border-radius:12px;
}

/* empty text – same tone as other hints */
.gallery-empty{
  color: var(--muted);
  margin: 2px 0 10px;
}

/* grid similar to your uploads, but compact */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
}

/* cards feel like small dropzones */
.gallery-card{
  position:relative;
  background: var(--surface-card);
  border:1px dashed var(--border);
  border-radius:14px;
  overflow:hidden;
  box-shadow: var(--shadow-soft);
}

.gallery-thumb{
  display:block; width:100%; height:180px; object-fit:cover;
  background:#0e1117;
}

/* action chips */
.gallery-card-actions{
  position:absolute; right:8px; bottom:8px;
  display:flex; gap:6px;
}
.gal-btn{
  appearance:none; border:1px solid var(--border);
  background:rgba(0,0,0,.45); color:#fff;
  padding:6px 8px; border-radius:999px; cursor:pointer;
  text-decoration:none; font-size:13px; line-height:1;
  box-shadow: var(--shadow-card);
}
.gal-btn:hover{ background:rgba(0,0,0,.65) }

/* responsive tweaks */
@media (max-width: 768px){
  .gallery-grid{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
  .gallery-thumb{ height:150px; }
}

/* --- Make gallery look exactly like other info cards --- */
.gallery-box{
  /* no custom background/border here — inherit from .info-box */
  padding-top: 16px; /* match vertical rhythm under .info-title */
}

/* Header row (clear button on the right) */
.gallery-head{
  display:flex; justify-content:flex-end; align-items:center;
  gap:8px; margin: 4px 0 10px;
}
.gallery-empty{
  color: var(--muted);
  margin: 0 0 10px;
}

/* Grid of thumbs inside the card */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
}

/* Thumb cards – subtle, like inner elements of your cards */
.gallery-card{
  position:relative;
  background: var(--surface-card);
  border: 1px dashed var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.gallery-thumb{
  display:block; width:100%; height:180px; object-fit:cover; background:#0e1117;
}

/* Small action pills */
.gallery-card-actions{
  position:absolute; right:8px; bottom:8px;
  display:flex; gap:6px;
}
.gal-btn{
  appearance:none; border:1px solid var(--border);
  background:rgba(0,0,0,.45); color:#fff;
  padding:6px 8px; border-radius:999px; cursor:pointer;
  text-decoration:none; font-size:13px; line-height:1;
  box-shadow: var(--shadow-card);
}
.gal-btn:hover{ background:rgba(0,0,0,.65) }

@media (max-width:768px){
  .gallery-grid{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
  .gallery-thumb{ height:150px; }
}

/* Make the info row wrapper neutral – no semi-transparent band/gradient */
.info-split{
  margin-top: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;        /* mobile */
}
@media (min-width: 900px){
  .info-split{ grid-template-columns: 1fr 1fr; }
}

/* Gallery uses the same card style via .info-box; only inner layout below */
.gallery-box{ padding-top: 16px; }

/* Title + action on the same line */
.info-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.info-head .info-title{
  margin: 0;             /* same visual as other cards */
}
.info-head .btn-line{
  height: 36px;          /* looks level with the title line */
  padding: 8px 12px;
  border-radius: 12px;
}

/* Empty text tone and spacing */
.gallery-empty{
  color: var(--muted);
  margin: 0 0 10px;
}

/* Thumbs grid (unchanged) */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
@media (max-width: 768px){
  .gallery-grid{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* ===== Mobile polish ===== */
@media (max-width: 520px){

  /* make info cards a bit tighter on phones */
  .info-box{
    padding: 14px;
    border-radius: 14px;
  }

  /* the row that has: [Title] [Vymazať galériu] */
  .info-head{
    flex-wrap: wrap;               /* allow wrap on small width */
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
  }
  .info-head .info-title{
    font-size: 1.1rem;             /* prevent huge wrapped titles */
    line-height: 1.25;
    flex: 1 1 auto;                 /* title takes the row, button moves below/right */
    margin: 0;
    word-break: break-word;
  }
  .info-head .btn-line{
    order: 2;
    margin-left: auto;              /* right-align on its own wrapped line */
    height: 32px;
    padding: 6px 10px;
    border-radius: 10px;
  }

  /* gallery grid: two thumbs per row on phones */
  .gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .gallery-thumb{ height: 140px; }

  /* two-column helper wrapper becomes single column on phones */
  .info-split{
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* --- A11y utility: screen-reader only --- */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* stack children vertically and center them (button → counter → progress) */
.actions.center-col{
  flex-direction: column;
  align-items: center;
  gap: 6px;              /* nice spacing between rows */
}

/* counter appearance */
.quota-info{
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  margin-top: 2px;       /* already have gap above; keep small */
  width: 100%;
}

/* responsive tweak */
@media (max-width: 520px){
  .quota-info{ font-size: .85rem; }
}

/* ===== Source chooser sheet ===== */
/* ===== Source chooser sheet ===== */
.sheet-overlay{
  position: fixed; inset:0; z-index: 10000;
  display:grid; place-items:center;   /* center namiesto end center */
}
.sheet-backdrop{
  position:absolute; inset:0; background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px) saturate(1.05);
}
.sheet-card{
  position:relative;
  width:min(420px, 92vw);              /* mierne menšie, aby sa zmestil na mobily */
  background: var(--surface-card);
  border:1px solid var(--border);
  border-radius: 16px;                 /* plné zaoblenie */
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  animation: sheet-pop .18s ease-out;
}
@keyframes sheet-pop {
  from{ transform: scale(.94); opacity:.85 }
  to{ transform: scale(1); opacity:1 }
}

.sheet-head{ margin-bottom: 10px; text-align:center; }
.sheet-title{ font-weight:800; font-size:1.1rem; }

.sheet-actions{
  display:grid; gap:10px;
  grid-template-columns: 1fr;
  margin-bottom: 10px;
}
.sheet-btn{
  appearance:none; border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--fg); padding: 12px 14px;
  border-radius: 12px; cursor:pointer;
  font-weight:600;
  transition: background .15s ease, transform .15s ease;
}
.sheet-btn:hover{ background: rgba(255,255,255,.07); transform: translateY(-1px); }

.sheet-cancel{
  width:100%;
  appearance:none; border:0;
  background: transparent; color: var(--muted);
  padding: 10px 0 4px; cursor:pointer;
}


.sheet-actions{
  display:grid; gap:10px;
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}

/* ===== Gallery carousel (lightbox) ===== */
.carousel{
  position: relative;
  width: 100%;
  height: min(80vh, 76dvh);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0e1117;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y; /* allow vertical page scroll */
}
.carousel-track{
  display: flex;
  height: 100%;
  transition: transform .28s ease;
  will-change: transform;
}
.carousel-slide{
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.carousel-img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .2s ease;
}
.carousel-img[src]{ opacity: 1; }

/* nav arrows */
.carousel-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.carousel-nav:hover{ background: rgba(0,0,0,.65); }
.carousel-nav:disabled{ opacity:.4; cursor: default; }
.carousel-nav.prev{ left: 10px; }
.carousel-nav.next{ right: 10px; }

/* slide counter */
.carousel-indicator{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.45);
  font-size: .9rem;
  box-shadow: var(--shadow-card);
}

/* Make backdrop clicks feel responsive on mobile */
.modal-backdrop{ cursor: zoom-out; }
