/* Craft One cookie consent — mirrors App CookieConsentBanner
 * Structure: bottom sheet + Switch rows (NOT full-screen modal / checkboxes)
 * Tokens: src/lib/cookie-consent.ts → COOKIE_CONSENT_UI
 */

#cc-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
  padding: 16px 16px 24px;
  background: rgba(0, 0, 0, 0.35);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[data-cookie-functional='1'] #cc-root {
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
#cc-root.cc-open {
  display: block;
}
#cc-card {
  width: min(520px, 100%);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  border-top: 3px solid #4E8DFF;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#cc-card h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #121212;
  line-height: 1.3;
}
#cc-card p {
  margin: 0;
  color: #3f3f3f;
  font-size: 0.875rem;
  line-height: 1.4;
}
#cc-card a {
  color: #121212;
  text-decoration: underline;
}
.cc-rows {
  display: grid;
  gap: 8px;
}
.cc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #121212;
  background: none;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.cc-row:disabled,
.cc-row[aria-disabled='true'] {
  cursor: default;
  opacity: 0.85;
}
.cc-row-label {
  flex: 1;
  padding-right: 8px;
}
/* Switch (matches RN Switch track) */
.cc-switch {
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: #d6d6d6;
  flex-shrink: 0;
  transition: background 0.15s ease;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.cc-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(26, 20, 16, 0.25);
  transition: transform 0.15s ease;
}
.cc-row[aria-checked='true'] .cc-switch,
.cc-switch.cc-on {
  background: #4E8DFF;
}
.cc-row[aria-checked='true'] .cc-switch::after,
.cc-switch.cc-on::after {
  transform: translateX(20px);
}
.cc-row:disabled .cc-switch,
.cc-row[aria-disabled='true'] .cc-switch {
  cursor: default;
}
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
/* display:flex would otherwise override the hidden attribute */
#cc-settings[hidden],
.cc-actions[hidden] {
  display: none !important;
}
.cc-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.cc-btn-primary {
  background: #4E8DFF;
  color: #fff;
}
.cc-btn-ghost {
  background: #ffffff;
  color: #121212;
  border: 1px solid #d6d6d6;
  font-weight: 600;
}
.cc-btn:hover {
  opacity: 0.85;
}
.cc-btn:focus-visible {
  outline: 2px solid #4E8DFF;
  outline-offset: 2px;
}
.cc-footer-link {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  color: #3f3f3f;
  text-decoration: underline;
  font: inherit;
}
