.tuna-cc {
  --tuna-cc-primary: var(--ifm-color-primary, #2e8555);
  --tuna-cc-primary-dark: var(--ifm-color-primary-dark, #29784c);
  --tuna-cc-surface: var(--ifm-background-surface-color, #fff);
  --tuna-cc-border: var(--ifm-color-emphasis-300, #d1d5db);
  --tuna-cc-hover: var(--ifm-color-emphasis-200, #e5e7eb);

  position: fixed;
  z-index: 300;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: var(--tuna-cc-surface);
  border-top: 1px solid var(--tuna-cc-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  line-height: 1.5;
}

.tuna-cc[hidden],
.tuna-cc__menu[hidden] {
  display: none;
}

.tuna-cc__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 76rem;
  margin: 0 auto;
}

.tuna-cc__title {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.tuna-cc__text {
  margin: 0;
  opacity: 0.85;
}

.tuna-cc__text a {
  color: var(--tuna-cc-primary);
  text-decoration: underline;
}

.tuna-cc__split {
  position: relative;
  display: flex;
  flex-shrink: 0;
}

.tuna-cc__split button {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--tuna-cc-primary);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.tuna-cc__accept,
.tuna-cc__toggle {
  background: var(--tuna-cc-primary);
  color: #fff;
}

.tuna-cc__accept {
  flex: 1;
  border-radius: 0.5rem 0 0 0.5rem;
}

.tuna-cc__split .tuna-cc__toggle {
  padding: 0.5rem 0.75rem;
  border-left-color: rgba(255, 255, 255, 0.4);
  border-radius: 0 0.5rem 0.5rem 0;
}

.tuna-cc__accept:hover,
.tuna-cc__toggle:hover,
.tuna-cc__toggle[aria-expanded='true'] {
  background: var(--tuna-cc-primary-dark);
}

.tuna-cc__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.25rem);
  min-width: 100%;
}

.tuna-cc__menu button {
  width: 100%;
  border-radius: 0.5rem;
  background: var(--tuna-cc-surface);
  color: inherit;
}

.tuna-cc__menu button:hover {
  background: var(--tuna-cc-hover);
}

@media (max-width: 768px) {
  .tuna-cc__content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
}
