@tailwind base;
@tailwind components;
@tailwind utilities;

.stago-on-off-pill {
  display: inline-flex;
  flex-shrink: 0;
  user-select: none;
  padding: 2px;
  border: 0;
  border-radius: 8px;
  background: #e5e7eb;
  font-size: 0.75rem;
  font-weight: 700;
}

.stago-on-off-pill__option {
  min-width: 44px;
  min-height: 28px;
  padding: 4px 12px;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  color: #8b93a1 !important;
  font: inherit;
  line-height: 1;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.stago-on-off-pill__option:hover:not(:disabled) {
  color: #4b5563 !important;
}

.stago-on-off-pill__option[data-active='true'][data-value='off'] {
  background: #cbd1d8 !important;
  color: #374151 !important;
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.12);
}

.stago-on-off-pill__option[data-active='true'][data-value='on'] {
  background: var(--stago-ai, #6a5cff) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgb(56 44 190 / 0.28);
}

.stago-on-off-pill__option:focus-visible,
.privacy-choice-action:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--stago-ai) 85%, black);
  outline-offset: 2px;
}

.stago-on-off-pill__option:disabled {
  cursor: wait;
  opacity: 0.6;
}

.privacy-choice-banner {
  border: 1px solid rgb(17 24 39 / 0.14) !important;
  box-shadow:
    0 18px 48px rgb(15 20 25 / 0.28),
    0 2px 8px rgb(15 20 25 / 0.16);
}

.privacy-choice-details {
  border-block: 1px solid rgb(17 24 39 / 0.08);
}

.privacy-choice-details > * + * {
  border-top: 1px solid rgb(17 24 39 / 0.08);
}

.privacy-choice-always-on {
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.privacy-choice-action {
  min-height: 40px;
  padding: 8px 16px;
  border: 0 !important;
  border-radius: 9px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

.privacy-choice-action--secondary {
  background: #eef0f3 !important;
  color: #5f6875 !important;
}

.privacy-choice-action--secondary:hover:not(:disabled) {
  background: #e2e5e9 !important;
}

.privacy-choice-action--tertiary {
  background: #eef0f3 !important;
  color: #5f6875 !important;
}

.privacy-choice-action--tertiary:hover:not(:disabled) {
  background: #f0f1f3 !important;
  color: #1f2937 !important;
}

.privacy-choice-action--primary {
  background: var(--stago-ai, #6a5cff) !important;
  color: #fff !important;
}

.privacy-choice-action--primary:hover:not(:disabled) {
  opacity: 0.9;
}

html.dark .stago-on-off-pill {
  background: #0f1419;
}

html.dark .stago-on-off-pill__option {
  color: #78818e !important;
}

html.dark .stago-on-off-pill__option:hover:not(:disabled) {
  color: #c4c9d1 !important;
}

html.dark .stago-on-off-pill__option[data-active='true'][data-value='off'] {
  background: #3a424d !important;
  color: #f3f4f6 !important;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

html.dark .privacy-choice-details {
  border-block-color: rgb(255 255 255 / 0.08);
}

html.dark .privacy-choice-banner {
  border-color: rgb(132 116 255 / 0.28) !important;
  box-shadow:
    0 20px 56px rgb(0 0 0 / 0.52),
    0 2px 10px rgb(0 0 0 / 0.35);
}

html.dark .stago-on-off-pill__option:focus-visible,
html.dark .privacy-choice-action:focus-visible {
  outline-color: color-mix(in srgb, var(--stago-ai) 55%, white);
}

html.dark .privacy-choice-details > * + * {
  border-top-color: rgb(255 255 255 / 0.08);
}

html.dark .privacy-choice-always-on {
  background: #2a3038;
  color: #d7dbe1;
}

html.dark .privacy-choice-action--secondary {
  background: #222831 !important;
  color: #aeb5bf !important;
}

html.dark .privacy-choice-action--secondary:hover:not(:disabled) {
  background: #2b333d !important;
}

html.dark .privacy-choice-action--tertiary {
  background: #222831 !important;
  color: #aeb5bf !important;
}

html.dark .privacy-choice-action--tertiary:hover:not(:disabled) {
  background: #252b33 !important;
  color: #fff !important;
}
