:root {
  --cc-bg: #ffffff;
  --cc-bg-muted: #f7f9fd;
  --cc-border: #d0d7de;
  --cc-text: #0C1B38;
  --cc-text-muted: #4b5563;
  --cc-primary: #005DFF;
  --cc-primary-soft: rgba(0, 93, 255, 0.08);
  --cc-success: #22c55e;
  --cc-shadow: 0 18px 40px rgba(12, 27, 56, 0.22);
  --cc-radius-lg: 18px;
  --cc-radius-pill: 999px;
  --cc-font: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cc-z: 9999;
}

/* BANNER */
.cc-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--cc-z);
  display: flex;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  font-family: var(--cc-font);
  pointer-events: none; /* abilitiamo solo la card interna */
}

.cc-banner-inner {
  pointer-events: auto;
  max-width: 720px;
  width: 100%;
  background: var(--cc-bg);
  border-radius: var(--cc-radius-lg);
  box-shadow: var(--cc-shadow);
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(0, 93, 255, 0.08);
}

.cc-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--cc-text);
}

.cc-text {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--cc-text-muted);
  line-height: 1.6;
}

.cc-text-sm {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cc-text-muted);
}

/* AZIONI */
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cc-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--cc-text-muted);
}

.cc-links a,
.cc-link-button {
  color: var(--cc-primary);
  text-decoration: none;
}

.cc-link-button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

/* BUTTONS */
.cc-btn {
  border-radius: var(--cc-radius-pill);
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background-color 0.08s ease;
  font-weight: 500;
}

.cc-btn-primary {
  background: var(--cc-primary);
  color: #ffffff;
  border-color: var(--cc-primary);
}

.cc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 93, 255, 0.35);
}

.cc-btn-outline {
  background: var(--cc-bg-muted);
  color: var(--cc-text);
  border-color: var(--cc-border);
}

.cc-btn-outline:hover {
  background: #e5edff;
}

.cc-btn-ghost {
  background: transparent;
  color: var(--cc-primary);
  border-color: transparent;
}

.cc-btn-ghost:hover {
  background: var(--cc-primary-soft);
}

/* MODAL */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--cc-z) + 1);
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--cc-font);
}

.cc-modal[aria-hidden="false"] {
  display: flex;
}

.cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 16, 0.6);
}

.cc-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  margin: 1rem;
  background: var(--cc-bg);
  border-radius: var(--cc-radius-lg);
  box-shadow: var(--cc-shadow);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  border: 1px solid rgba(0, 93, 255, 0.14);
}

.cc-modal-header,
.cc-modal-footer {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cc-modal-body {
  padding: 0 1.5rem 1rem;
  overflow-y: auto;
}

/* Icon button close */
.cc-icon-button {
  border: none;
  background: var(--cc-bg-muted);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cc-text-muted);
}

/* CATEGORIE */
.cc-category {
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.cc-category-main {
  max-width: 75%;
}

.cc-category-title {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  color: var(--cc-text);
}

.cc-category-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--cc-text-muted);
}

.cc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-bg-muted);
  font-size: 0.72rem;
  color: var(--cc-text-muted);
}

/* SWITCH */
.cc-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cc-switch-slider {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background-color 0.25s ease;
}

.cc-switch-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  left: 3px;
  top: 3px;
  transition: transform 0.25s ease;
}

.cc-switch input:checked + .cc-switch-slider {
  background: var(--cc-success);
}

.cc-switch input:checked + .cc-switch-slider::before {
  transform: translateX(18px);
}

.cc-switch-label {
  color: var(--cc-text-muted);
}

/* FOOTER MODAL */
.cc-modal-footer {
  border-top: 1px solid #e5e7eb;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .cc-banner-inner {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .cc-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cc-modal-dialog {
    margin: 0.75rem;
    max-height: calc(100vh - 1.5rem);
  }

  .cc-modal-header,
  .cc-modal-footer,
  .cc-modal-body {
    padding-inline: 1.1rem;
  }

  .cc-category {
    flex-direction: column;
    align-items: flex-start;
  }

  .cc-category-main {
    max-width: 100%;
  }
}
