/*
 * Aural Consent Lite - "Frost Glass" Lux Edition (FINAL)
 */

.aural-consent-lite {
  /* --- BOJE & VARIJABLE --- */
  --ac-fg: #1a1a1a;                 /* Taman tekst */
  --ac-muted: #555555;              /* Sivi tekst */
  
  --ac-border: rgba(255, 255, 255, 0.65); /* Bela staklena ivica */
  --ac-shadow: 0 15px 40px rgba(0,0,0,0.12);
  
  --ac-radius: 42px;                
  --ac-radius-sm: 30px;             
  
  --ac-accent: #ffffff;             
  --ac-accent-bg: #B08D55;          /* ZLATNA #B08D55 */
  
  --ac-btn-bg: rgba(255, 255, 255, 0.5); 
  --ac-btn-bg-hover: #fcfcfc;            
  --ac-btn-border: rgba(176, 141, 85, 0.3); 

  /* --- POZICIONIRANJE I STIL GLAVNOG BANERA --- */
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999999;
  padding: 18px 26px;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  color: var(--ac-fg);

  /* FROST GLASS POZADINA */
  background: rgba(248, 244, 235, 0.70) !important; 
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: var(--ac-radius);
  border: 1px solid var(--ac-border);
  box-shadow: var(--ac-shadow);
  
  margin: 24px;
  width: auto;
}

/* Reset pozicija */
.aural-consent-lite--bottom { bottom: 0; left: 0; right: 0; }
.aural-consent-lite--top { top: 0; left: 0; right: 0; }

/* Corner stil (Desktop) */
.aural-consent-lite--corner {
  margin: 0;
  left: auto;
  right: auto;
  max-width: 440px;
  width: calc(100% - 48px);
}

.aural-consent-lite--bottom_left { bottom: 24px; left: 24px; }
.aural-consent-lite--bottom_right { bottom: 24px; right: 24px; }

.aural-consent-lite__inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* IKONICA */
.aural-consent-lite__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--ac-accent-bg);
}
.aural-consent-lite__icon svg { width: 22px; height: 22px; }

/* TEKST */
.aural-consent-lite__text {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.aural-consent-lite__link {
  color: var(--ac-fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 600;
}

/* CLOSE (X) NA GLAVNOM BANERU */
.aural-consent-lite__close {
  border: 0;
  background: transparent;
  color: var(--ac-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.aural-consent-lite__close:hover { color: #000; }

.aural-consent-lite--corner .aural-consent-lite__close {
  position: absolute; top: 14px; right: 14px;
}
.aural-consent-lite--corner .aural-consent-lite__inner { padding-right: 20px; }


/* --- BUTTONS (Global) --- */
.aural-consent-lite__btn {
  border: 1px solid var(--ac-btn-border);
  background: var(--ac-btn-bg);
  color: var(--ac-fg);
  border-radius: var(--ac-radius-sm);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700; /* Bold, kao na tvojoj temi */
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase; /* Opciono: ako tvoja tema koristi velika slova */
  letter-spacing: 0.5px;
}

.aural-consent-lite__btn:hover {
  background: #fff;
  border-color: var(--ac-accent-bg);
  color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

/* ZLATNO DUGME (Accept & Save) */
.aural-consent-lite__btn--accept {
  border-color: var(--ac-accent-bg);
  background: var(--ac-accent-bg);
  color: #fff;
  box-shadow: 0 4px 15px rgba(176, 141, 85, 0.35);
}

.aural-consent-lite__btn--accept:hover {
  background: #a37c40; /* Tamnija zlatna */
  border-color: #a37c40;
  color: #fff !important;
}

/* --- MALI PLUTAJUCI DUGMIC (Reopen) --- */
.aural-consent-lite__footer-link {
  display: block;
  position: fixed;
  bottom: calc(var(--ac-reopen-offset-y, 24px) + env(safe-area-inset-bottom));
  left: calc(var(--ac-reopen-offset-x, 24px) + env(safe-area-inset-left));
  z-index: 999990;
  
  /* Glass Pill */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  
  transition: all 0.3s ease;
}

.aural-consent-lite__footer-link[data-ac-reopen-anchor="right"] {
  left: auto;
  right: calc(var(--ac-reopen-offset-x, 24px) + env(safe-area-inset-right));
}

.aural-consent-lite__footer-link a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

/* Ikonica zupcanika */
.aural-consent-lite__footer-link a::before {
  content: '⚙'; 
  font-size: 14px;
  color: #B08D55;
  margin-top: -2px;
}

/* If a custom icon is configured, don't render the default ::before icon. */
.aural-consent-lite__footer-link--has-icon:not([data-ac-display="text"]) a::before {
  content: none !important;
}

.aural-consent-lite__reopen-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.aural-consent-lite__reopen-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

/* Reopen display modes (desktop) - driven by data attributes. */
.aural-consent-lite__footer-link[data-ac-display="text"] .aural-consent-lite__reopen-icon { display: none; }
.aural-consent-lite__footer-link[data-ac-display="icon_only"] .aural-consent-lite__reopen-text { display: none; }


/* Icon-only reopen widget: show just the icon (no pill/frame) and make it larger. */
.aural-consent-lite__footer-link--icon-only .aural-consent-lite__reopen-text { display: none; }

.aural-consent-lite__footer-link--icon-only a {
  padding: 0;
  gap: 0;
  text-transform: none;
}

.aural-consent-lite__footer-link--icon-only .aural-consent-lite__reopen-icon {
  display: block;
}

.aural-consent-lite__footer-link--icon-only .aural-consent-lite__reopen-icon img,
.aural-consent-lite__footer-link--icon-only .aural-consent-lite__reopen-img {
  width: var(--ac-reopen-icon-size, 64px);
  height: var(--ac-reopen-icon-size, 64px);
  display: block;
  border-radius: 999px;
  /* Nice lift without adding a white frame */
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.18));
}

.aural-consent-lite__footer-link--icon-only:hover {
  transform: translateY(-2px);
  box-shadow: none;
  background: transparent;
}
.aural-consent-lite__footer-link:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}


/* --- VELIKI SETTINGS MODAL --- */
.aural-consent-lite__modal { position: fixed; inset: 0; z-index: 1000000; }

.aural-consent-lite__modal-backdrop {
  position: absolute; inset: 0; 
  background: rgba(60, 60, 60, 0.45); 
  backdrop-filter: blur(6px); /* Blur pozadine sajta dok je modal otvoren */
}

.aural-consent-lite__modal-panel {
  position: relative;
  max-width: 550px;
  width: calc(100% - 40px);
  margin: 10vh auto;
  
  /* STAKLENA POZADINA ZA MODAL (Kao što si tražio) */
  background: rgba(248, 244, 235, 0.90); /* Malo manje providno od banera */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 32px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
  
  color: #333;
  padding: 30px;
}

.aural-consent-lite__modal-title {
  font-size: 20px; font-weight: 700; margin: 0 0 15px; color: #1a1a1a;
}

/* MODAL CLOSE (X) - Sređeno */
.aural-consent-lite__modal-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(0,0,0,0.06); /* Blago sivo */
  border: 0;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 18px; color: #555;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.aural-consent-lite__modal-close:hover { 
  background: rgba(176, 141, 85, 0.2); /* Blago zlatno na hover */
  color: #000; 
}

/* LISTA TOGGLE-OVA */
.aural-consent-lite__toggles {
  margin: 20px 0; max-height: 55vh; overflow-y: auto; padding-right: 10px;
}
.aural-consent-lite__toggles::-webkit-scrollbar { width: 5px; }
.aural-consent-lite__toggles::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

.aural-consent-lite__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 15px;
  padding: 16px; 
  background: rgba(255,255,255,0.6); /* Polu-providne kartice */
  border: 1px solid rgba(255,255,255,0.5); 
  border-radius: 16px; 
  margin-bottom: 12px;
  transition: background 0.2s;
}
.aural-consent-lite__toggle:hover {
  background: rgba(255,255,255,0.9);
}

.aural-consent-lite__toggle-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.aural-consent-lite__toggle-desc { font-size: 13px; color: #666; line-height: 1.4; }

/* CHECKBOX - ZLATNA BOJA */
.aural-consent-lite__toggle-control input[type="checkbox"] {
  accent-color: var(--ac-accent-bg); /* #B08D55 */
  width: 22px; height: 22px; cursor: pointer;
  border-radius: 4px;
}

/* DUGMICI U MODALU (Save & Decline) */
.aural-consent-lite__modal-actions {
  display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; padding-top: 20px; 
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* Specifično: Save dugme da bude ZLATNO (kao Accept) */
.aural-consent-lite__modal-actions .aural-consent-lite__btn:last-child {
  border-color: var(--ac-accent-bg);
  background: var(--ac-accent-bg);
  color: #fff;
  box-shadow: 0 4px 15px rgba(176, 141, 85, 0.35);
}
.aural-consent-lite__modal-actions .aural-consent-lite__btn:last-child:hover {
  background: #9e7d4d;
  border-color: #9e7d4d;
}

/* Decline dugme (prvo) - da bude belo/providno */
.aural-consent-lite__modal-actions .aural-consent-lite__btn:first-child {
   background: transparent;
   border: 1px solid transparent;
   color: #666;
   box-shadow: none;
}
.aural-consent-lite__modal-actions .aural-consent-lite__btn:first-child:hover {
   color: #000;
   text-decoration: underline;
   background: transparent;
   transform: none;
}


/* --- MOBILNI PRIKAZ (Popravke) --- */
@media (max-width: 600px) {
  /* Mobile override for reopen display (<=600px). */
  .aural-consent-lite__footer-link[data-ac-mobile-display="text"] .aural-consent-lite__reopen-icon { display: none; }
  .aural-consent-lite__footer-link[data-ac-mobile-display="text"] .aural-consent-lite__reopen-text { display: inline; }

  .aural-consent-lite__footer-link[data-ac-mobile-display="icon_text"] .aural-consent-lite__reopen-icon { display: inline-flex; }
  .aural-consent-lite__footer-link[data-ac-mobile-display="icon_text"] .aural-consent-lite__reopen-text { display: inline; }

  .aural-consent-lite__footer-link[data-ac-mobile-display="icon_only"] .aural-consent-lite__reopen-text { display: none; }

  /* When mobile is icon-only (but desktop isn't), remove the pill/frame on mobile only. */
  .aural-consent-lite__footer-link--mobile-icon-only {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .aural-consent-lite__footer-link--mobile-icon-only a {
    padding: 0;
    gap: 0;
    text-transform: none;
  }
  .aural-consent-lite__footer-link--mobile-icon-only .aural-consent-lite__reopen-icon img,
  .aural-consent-lite__footer-link--mobile-icon-only .aural-consent-lite__reopen-img {
    width: var(--ac-reopen-icon-size-mobile, var(--ac-reopen-icon-size, 64px));
    height: var(--ac-reopen-icon-size-mobile, var(--ac-reopen-icon-size, 64px));
  }

  /* If icon-only is used (desktop class) on mobile, allow a mobile-specific size override. */
  .aural-consent-lite__footer-link--icon-only .aural-consent-lite__reopen-icon img,
  .aural-consent-lite__footer-link--icon-only .aural-consent-lite__reopen-img {
    width: var(--ac-reopen-icon-size-mobile, var(--ac-reopen-icon-size, 64px));
    height: var(--ac-reopen-icon-size-mobile, var(--ac-reopen-icon-size, 64px));
  }

  /* GLAVNI BANER POPRAVKA */
  .aural-consent-lite {
    margin: 0; /* Resetujemo marginu */
    /* Koristimo left/right da ga fiksiramo i centriramo */
    left: 15px; 
    right: 15px;
    bottom: 15px; /* Odmaknuto od dna */
    width: auto; /* Da ispuni prostor izmedju left i right */
    
    border-radius: 28px; 
    padding: 20px; 
  }

  .aural-consent-lite__inner { justify-content: center; text-align: center; gap: 14px; }
  .aural-consent-lite__actions { justify-content: center; width: 100%; gap: 10px; }
  
  /* Dugmići punom širinom na mobu */
  .aural-consent-lite__btn { width: 100%; justify-content: center; padding: 12px 0; }
  
  /* MALI PLUTAJUCI DUGMIC - PODIGNUT NA 20px */
  .aural-consent-lite__footer-link { 
    bottom: calc(var(--ac-reopen-offset-y-mobile, var(--ac-reopen-offset-y, 20px)) + env(safe-area-inset-bottom)); 
    left: calc(var(--ac-reopen-offset-x-mobile, var(--ac-reopen-offset-x, 20px)) + env(safe-area-inset-left)); 
    padding: 8px 14px; 
  }

  .aural-consent-lite__footer-link[data-ac-reopen-anchor="right"] {
    left: auto;
    right: calc(var(--ac-reopen-offset-x-mobile, var(--ac-reopen-offset-x, 20px)) + env(safe-area-inset-right));
  }
  
  /* MODAL NA MOBILNOM */
  .aural-consent-lite__modal-panel { 
    margin: 5vh auto; 
    width: calc(100% - 30px); /* Malo uže od ekrana */
    padding: 24px; 
    max-height: 85vh;
    overflow-y: auto;
  }
  
  .aural-consent-lite__modal-actions { 
    flex-direction: column-reverse; /* Save gore, Decline dole */
    gap: 15px;
  }
  
  .aural-consent-lite__modal-actions .aural-consent-lite__btn:first-child {
    border: 1px solid #ddd; /* Dodajemo okvir za Decline na mobu da se vidi */
    padding: 12px;
  }
}
