
/* Stili banner overlay conforme best practice */
:root{
  --cc-bg:rgb(0 108 100);
  --cc-fg:#f8f8f8;
  --cc-accent:#1ab69d;
  --cc-muted:#74b0ad;
  --cc-low:#5b978d;
  --cc-danger:#ef4444;
}
.cookie-app-icon{
  position: fixed;
  bottom:20px;
  right:20px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--cc-accent);
  border-radius: 50%;
  
  box-shadow: 0 0 10px rgba(0,0,0,.5);
  opacity: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cookie-app-icon:hover{
  position: fixed;
  bottom:20px;
  right:20px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--cc-bg);
  border-radius: 50%;
  background: var(--cc-bg);
  box-shadow: 0 0 10px rgba(0,0,0,.5);
  opacity: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cookie-app-icon.out{
  position: fixed;
  bottom:10px;
  right:10px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cc-bg);
  box-shadow: 0 0 10px rgba(0,0,0,.5);
  opacity: 0;
  cursor: pointer;
}

.cookie-banner{
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 99999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.cookie-banner.visible{ display:flex; }

/* Modalità collapsed: banner in basso */
.cookie-banner.collapsed{
  inset: auto 0 0 0;
  height: auto;
  background: transparent;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}

.cookie-card{
  background: var(--cc-bg);
  color: var(--cc-fg);
  max-width: 720px; width: 94%;
  border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  position: relative;
  transition: all 0.3s ease;
}

/* Stili per modalità collapsed */
.cookie-banner.collapsed .cookie-card{
  max-width: 500px;
  padding: 16px 18px;
  border-radius: 12px;
}

.cookie-banner.collapsed .cookie-card img{
  width: 60px !important;
}

.cookie-banner.collapsed .cookie-card h2{
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--white);
}

.cookie-banner.collapsed .cookie-card p{
  font-size: 14px;
  margin: 0 0 10px;
}

.cookie-banner.collapsed .cookie-actions{
  margin-top: 10px;
  gap: 8px;
}

.cookie-banner.collapsed .cookie-actions .cookieBtn{
  padding: 8px 12px;
  font-size: 14px;
}

.cookie-banner.collapsed .cookie-footer{
  margin-top: 10px;
  font-size: 11px;
}

/* Nascondi elementi in modalità collapsed */
.cookie-banner.collapsed .cookie-advanced{
  display: none !important;
}

.cookie-banner.collapsed .cookie-save{
  display: none !important;
}

/* Pulsante per espandere */
.cookie-expand{
  position: absolute;
  top: 15px;
  left: 15px;
  background: none;
  border: none;
  color: var(--cc-fg);
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.cookie-banner.collapsed .cookie-expand{
  display: flex;
}

.cookie-expand:hover{
  background: rgba(255,255,255,0.1);
}

.cookie-close{
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--cc-fg);
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.cookie-close:hover{
  background: rgba(255,255,255,0.1);
}

.cookie-card h2{ margin:0 0 8px; font-size: 20px; color:var(--white)}
.cookie-card p{ margin: 0 0 12px; line-height:1.5; color:var(--cc-muted) }
.cookie-card a{ color:var(--cc-muted); }

.cookie-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px;}
.cookie-actions .cookieBtn{
  border:0; padding:8px 12px; border-radius: 10px; cursor:pointer; font-weight:600; font-size: 14px;
}
.btn-accept{ background: var(--cc-accent); color:var(--cc-fg); }
.btn-reject{ border:1px solid #5b978d !important;background:transparent; color:var(--cc-low); }
.btn-custom{ background: #222; color:var(--cc-fg); }

.btn-accept:hover, .btn-reject:hover, .btn-custom:hover{
  -webkit-transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  -moz-transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  filter: brightness(1.2);
}

.cookie-advanced{ display:none; margin-top:12px; border-top:1px solid #222; padding-top:10px; }
.cookie-advanced.visible{ display:block; }

.cookie-save{ display:none; }
.cookie-advanced.visible ~ .cookie-actions .cookie-save{ display:inline-block; }

.toggle{ display:flex; align-items:start; gap:8px; margin:8px 0; }
.toggle input{
  margin-top: 3px;
  accent-color:var(--cc-accent);
  height: 20px;
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}


.cookie-footer{ margin-top:14px; font-size: 12px; color:var(--cc-muted); display:flex; justify-content: space-between; gap:10px; flex-wrap:wrap; }
.cookie-footer a{ color:#ddd; text-decoration: underline; }
.cookie-footer code{ color:var(--cc-muted) }

.cookie-list table{ width:100%; border-collapse: collapse; margin:10px 0 20px; font-size:14px; }
.cookie-list th, .cookie-list td{ border:1px solid #333; padding:8px; }
.cookie-list th{ background:#1b1b1b; }
