/* ============================================================
   SOL SRL – cookie-banner.css
   ============================================================ */

#sol-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border-top: 3px solid #007b90;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.10);
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: #666666;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

#sol-cookie-banner.visible {
  transform: translateY(0);
}

/* ── Layout principale ── */
.cb-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.cb-text h3 {
  font-size: 15px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 5px;
}

.cb-text p {
  font-size: 13px;
  color: #666666;
  line-height: 1.6;
  max-width: 680px;
}

.cb-text p a {
  color: #007b90;
  text-decoration: underline;
}

.cb-text p a:hover {
  color: #005f6e;
}

/* ── Pulsanti principali ── */
.cb-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cb-btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  white-space: nowrap;
  border: none;
}

.cb-btn-accept {
  background: #007b90;
  color: #ffffff;
}
.cb-btn-accept:hover { opacity: 0.88; }

.cb-btn-reject {
  background: transparent;
  color: #666666;
  border: 1.5px solid #cccccc;
}
.cb-btn-reject:hover { border-color: #999; color: #333; }

.cb-btn-settings {
  background: transparent;
  color: #007b90;
  border: 1.5px solid #007b90;
}
.cb-btn-settings:hover { background: #007b90; color: #ffffff; }

/* ── Pannello dettaglio (espandibile) ── */
.cb-detail {
  display: none;
  background: #f4f9fa;
  border-top: 1px solid #d0e8ec;
}

.cb-detail.open {
  display: block;
}

.cb-detail-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 60px 28px;
}

.cb-detail-inner h4 {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cb-categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.cb-category {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #d8eaed;
  border-radius: 6px;
  padding: 16px 20px;
}

.cb-category-info { flex: 1; }

.cb-category-info strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #333333;
  display: block;
  margin-bottom: 4px;
}

.cb-category-info span {
  font-size: 12.5px;
  color: #666666;
  line-height: 1.55;
}

/* ── Toggle switch ── */
.cb-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cb-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cccccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.cb-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.cb-toggle input:checked + .cb-toggle-slider {
  background: #007b90;
}

.cb-toggle input:checked + .cb-toggle-slider::before {
  transform: translateX(20px);
}

/* Toggle disabilitato (cookie necessari) */
.cb-toggle input:disabled + .cb-toggle-slider {
  background: #007b90;
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Azioni nel dettaglio ── */
.cb-detail-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cb-main {
    grid-template-columns: 1fr;
    padding: 18px 24px;
    gap: 16px;
  }
  .cb-actions {
    justify-content: flex-start;
  }
  .cb-detail-inner {
    padding: 18px 24px 22px;
  }
}

@media (max-width: 600px) {
  .cb-btn {
    font-size: 12.5px;
    padding: 9px 14px;
  }
  .cb-category {
    flex-direction: column;
    gap: 12px;
  }
  .cb-toggle {
    align-self: flex-start;
  }
}
