#wasl-cc-root {
  --wcc-bg: #ffffff;
  --wcc-text: #111827;
  --wcc-muted: #4b5563;
  --wcc-border: rgba(17, 24, 39, 0.14);
  --wcc-surface-alt: #f8fafc;
  --wcc-accent: #c8102e;
  --wcc-button-bg: #c8102e;
  --wcc-button-text: #ffffff;
  --wcc-radius: 14px;
  --wcc-button-radius: 9px;
  --wcc-width: 1180px;
  color: var(--wcc-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  direction: rtl;
}

#wasl-cc-root *,
#wasl-cc-root *::before,
#wasl-cc-root *::after {
  box-sizing: border-box;
}

#wasl-cc-root .wcc-banner {
  position: fixed;
  z-index: 999999;
  color: var(--wcc-text);
  background: var(--wcc-bg);
  border: 1px solid var(--wcc-border);
  border-top: 3px solid var(--wcc-accent);
  border-radius: var(--wcc-radius);
  box-shadow: 0 14px 42px rgba(10, 15, 28, 0.22);
  padding: 20px 24px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: wcc-enter 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#wasl-cc-root .wcc-banner.wcc-leaving {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Full-width Bar layout */
#wasl-cc-root .wcc-bar {
  left: 16px;
  right: 16px;
  width: auto;
  max-width: var(--wcc-width);
  margin-inline: auto;
}

/* Floating Card layout */
#wasl-cc-root .wcc-card {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 20px 22px;
}

#wasl-cc-root .wcc-bottom { bottom: 18px; }
#wasl-cc-root .wcc-top { top: 18px; }

#wasl-cc-root .wcc-card.wcc-bottom {
  left: 18px;
  right: auto;
}

#wasl-cc-root .wcc-card.wcc-top {
  left: 18px;
  right: auto;
}

/* Bar inner flex */
#wasl-cc-root .wcc-bar .wcc-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

/* Card inner stacked cleanly */
#wasl-cc-root .wcc-card .wcc-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

#wasl-cc-root .wcc-content {
  min-width: 0;
  flex: 1 1 auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#wasl-cc-root .wcc-content h2 {
  color: inherit;
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 8px;
  font-weight: 700;
  word-break: normal;
  overflow-wrap: break-word;
}

#wasl-cc-root .wcc-content p {
  color: var(--wcc-text);
  opacity: 0.9;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

#wasl-cc-root .wcc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
}

#wasl-cc-root .wcc-link {
  color: var(--wcc-accent);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Actions & Buttons */
#wasl-cc-root .wcc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

#wasl-cc-root .wcc-card .wcc-actions {
  width: 100%;
  justify-content: stretch;
}

#wasl-cc-root .wcc-card .wcc-actions .wcc-button {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
}

#wasl-cc-root .wcc-card .wcc-actions .wcc-primary {
  flex: 1 1 100%;
}

#wasl-cc-root .wcc-button {
  appearance: none;
  border: 1px solid var(--wcc-accent);
  border-radius: var(--wcc-button-radius);
  padding: 9px 15px;
  min-height: 40px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

#wasl-cc-root .wcc-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

#wasl-cc-root .wcc-button:focus-visible,
#wasl-cc-root a:focus-visible,
#wasl-cc-root input:focus-visible {
  outline: 3px solid var(--wcc-accent);
  outline-offset: 2px;
}

#wasl-cc-root .wcc-primary {
  color: var(--wcc-button-text);
  background: var(--wcc-button-bg);
  border-color: var(--wcc-button-bg);
}

#wasl-cc-root .wcc-secondary {
  color: var(--wcc-accent);
  background: transparent;
  border-color: var(--wcc-accent);
}

#wasl-cc-root.wcc-theme-dark .wcc-secondary {
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.35);
}

#wasl-cc-root .wcc-tertiary {
  color: var(--wcc-text);
  background: var(--wcc-surface-alt);
  border-color: var(--wcc-border);
}

#wasl-cc-root .wcc-actions.align-start { justify-content: flex-start; }
#wasl-cc-root .wcc-actions.align-center { justify-content: center; }
#wasl-cc-root .wcc-actions.align-end { justify-content: flex-end; }

/* Thank You State (in-place replacement) */
#wasl-cc-root .wcc-banner.wcc-is-thanks {
  padding: 18px 24px;
}

#wasl-cc-root .wcc-thanks-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  min-height: 44px;
}

#wasl-cc-root .wcc-thanks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wcc-accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  flex: 0 0 auto;
}

#wasl-cc-root .wcc-thanks-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--wcc-text);
}

/* Preferences Panel */
#wasl-cc-root .wcc-preferences {
  border-top: 1px solid var(--wcc-border);
  margin-top: 16px;
  padding-top: 14px;
}

#wasl-cc-root .wcc-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#wasl-cc-root .wcc-card .wcc-categories {
  grid-template-columns: 1fr;
}

#wasl-cc-root .wcc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--wcc-surface-alt);
  border: 1px solid var(--wcc-border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

#wasl-cc-root .wcc-category-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#wasl-cc-root .wcc-category small {
  color: var(--wcc-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

#wasl-cc-root .wcc-category input {
  accent-color: var(--wcc-accent);
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

#wasl-cc-root .wcc-inventory {
  margin-top: 12px;
}

#wasl-cc-root .wcc-inventory summary {
  cursor: pointer;
  color: var(--wcc-accent);
  font-weight: 600;
  font-size: 13.5px;
}

#wasl-cc-root .wcc-inventory ul {
  margin: 8px 0;
  padding-inline-start: 22px;
  max-height: 120px;
  overflow: auto;
  font-size: 13px;
}

#wasl-cc-root .wcc-save {
  margin-top: 12px;
  width: 100%;
}

@keyframes wcc-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tablet & Mobile Responsive Breakpoints */
@media (max-width: 900px) {
  #wasl-cc-root .wcc-bar .wcc-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  #wasl-cc-root .wcc-bar .wcc-actions {
    justify-content: flex-start;
  }
  #wasl-cc-root .wcc-categories {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  #wasl-cc-root .wcc-banner {
    padding: 16px;
    max-height: calc(100vh - 20px);
  }
  #wasl-cc-root .wcc-bar,
  #wasl-cc-root .wcc-card,
  #wasl-cc-root .wcc-card.wcc-bottom,
  #wasl-cc-root .wcc-card.wcc-top {
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
  }
  #wasl-cc-root .wcc-bottom { bottom: 10px; }
  #wasl-cc-root .wcc-top { top: 10px; }

  #wasl-cc-root .wcc-content h2 {
    font-size: 16.5px;
  }
  #wasl-cc-root .wcc-content p {
    font-size: 13.5px;
  }
  #wasl-cc-root .wcc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  #wasl-cc-root .wcc-actions .wcc-primary {
    grid-column: 1 / -1;
  }
  #wasl-cc-root .wcc-actions .wcc-button {
    width: 100%;
    padding: 9px 10px;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #wasl-cc-root .wcc-banner,
  #wasl-cc-root .wcc-button {
    animation: none;
    transition: none;
  }
}
