/* Cookie banner + preferenze — palette EasyContact (celeste) */

.ec-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  font-family: "RoobertENEL", system-ui, -apple-system, sans-serif;
  box-shadow: 0 -8px 32px rgba(3, 37, 76, 0.12);
}

.ec-cookie-banner__top {
  background: #0a0a0a;
  padding: 0.5rem 1rem;
}

.ec-cookie-banner__dismiss {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0;
  text-decoration: none;
}

.ec-cookie-banner__dismiss:hover {
  text-decoration: underline;
}

.ec-cookie-banner__main {
  background: #f3f4f6;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(10, 10, 10, 0.08);
}

@media (min-width: 768px) {
  .ec-cookie-banner__main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem 2rem;
    align-items: end;
    padding: 1.5rem 2rem;
  }
}

.ec-cookie-banner__title {
  font-size: 1.125rem;
  font-weight: 900;
  color: #0a0a0a;
  margin: 0 0 0.5rem;
}

.ec-cookie-banner__text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(10, 10, 10, 0.75);
  margin: 0;
  max-width: 52rem;
}

.ec-cookie-banner__link {
  color: #0369a1;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.ec-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .ec-cookie-banner__actions {
    margin-top: 0;
  }
}

.ec-cookie-btn {
  font-size: 0.875rem;
  font-weight: 800;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.ec-cookie-btn--outline {
  background: #fff;
  border: 2px solid #0ea5e9;
  color: #0369a1;
}

.ec-cookie-btn--outline:hover {
  background: #e0f2fe;
}

.ec-cookie-btn--primary {
  background: #0ea5e9;
  border: 2px solid #0ea5e9;
  color: #fff;
}

.ec-cookie-btn--primary:hover {
  background: #0369a1;
  border-color: #0369a1;
}

/* Modale preferenze */
.ec-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 0;
}

@media (min-width: 640px) {
  .ec-cookie-modal {
    align-items: center;
    padding: 1.5rem;
  }
}

.ec-cookie-modal__panel {
  background: #fff;
  width: 100%;
  max-width: 42rem;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 24px 48px rgba(3, 37, 76, 0.2);
}

@media (min-width: 640px) {
  .ec-cookie-modal__panel {
    border-radius: 1.25rem;
    max-height: 88vh;
  }
}

.ec-cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(156, 163, 175, 0.4);
  flex-shrink: 0;
}

.ec-cookie-modal__logo {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.ec-cookie-modal__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #0a0a0a;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.ec-cookie-modal__close:hover {
  background: #e5e7eb;
}

.ec-cookie-modal__scroll {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1rem;
  flex: 1;
}

.ec-cookie-modal__title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0a0a0a;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.ec-cookie-modal__intro {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(10, 10, 10, 0.8);
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(156, 163, 175, 0.35);
}

.ec-cookie-section {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(156, 163, 175, 0.35);
}

.ec-cookie-section:last-of-type {
  border-bottom: none;
}

.ec-cookie-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.ec-cookie-section__title {
  font-size: 1rem;
  font-weight: 900;
  color: #0a0a0a;
  margin: 0;
}

.ec-cookie-section__desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(10, 10, 10, 0.75);
  margin: 0 0 0.75rem;
}

.ec-cookie-radios {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.ec-cookie-radio {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0a0a0a;
  cursor: pointer;
}

.ec-cookie-radio input {
  accent-color: #0ea5e9;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.ec-cookie-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: #0369a1;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
}

.ec-cookie-toggle:hover {
  text-decoration: underline;
}

.ec-cookie-toggle__icon {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.65rem;
}

.ec-cookie-toggle[aria-expanded="true"] .ec-cookie-toggle__icon {
  transform: rotate(90deg);
}

.ec-cookie-vendors {
  display: none;
  margin-top: 0.5rem;
  border: 1px solid rgba(156, 163, 175, 0.45);
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.75rem;
}

.ec-cookie-vendors.is-open {
  display: block;
}

.ec-cookie-vendors__row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(156, 163, 175, 0.25);
  align-items: start;
}

.ec-cookie-vendors__row:last-child {
  border-bottom: none;
}

.ec-cookie-vendors__row--head {
  background: #f3f4f6;
  font-weight: 800;
  color: #0a0a0a;
}

.ec-cookie-vendors__company {
  font-weight: 700;
  color: #0a0a0a;
}

.ec-cookie-vendors__domain {
  color: rgba(10, 10, 10, 0.7);
  word-break: break-all;
}

.ec-cookie-modal__footer {
  flex-shrink: 0;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(156, 163, 175, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ec-cookie-modal__submit {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #0ea5e9;
  color: #fff;
  border: none;
  border-radius: 0.35rem;
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.ec-cookie-modal__submit:hover {
  background: #0369a1;
}

.ec-cookie-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
}

.ec-cookie-modal__footlink {
  background: none;
  border: none;
  color: #0369a1;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ec-cookie-modal__footlink:hover {
  text-decoration: underline;
}

.ec-cookie-policy-panel {
  display: none;
  padding: 1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(10, 10, 10, 0.8);
}

.ec-cookie-policy-panel.is-open {
  display: block;
}

.ec-cookie-hidden {
  display: none !important;
}
