:root {
  --cook-bg: #fbfaf7;
  --cook-surface: #ffffff;
  --cook-text: #171615;
  --cook-muted: #68625a;
  --cook-border: rgba(23, 22, 21, 0.14);
  --cook-accent: #9b7b42;
  --cook-accent-dark: #72572d;
  --cook-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  --cook-radius: 8px;
}

.cook-root {
  position: fixed;
  inset: auto 0 0;
  z-index: 2147483645;
  color: var(--cook-text);
  font-family: Arial, Helvetica, sans-serif;
  direction: rtl;
}

.cook-root[hidden] {
  display: none !important;
}

.cook-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.32);
}

.cook-root.is-modal .cook-backdrop {
  display: block;
}

.cook-banner,
.cook-modal {
  border: 1px solid var(--cook-border);
  background: var(--cook-bg);
  box-shadow: var(--cook-shadow);
}

.cook-banner {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto 16px;
  border-radius: var(--cook-radius);
  padding: 18px;
}

.cook-banner-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
}

.cook-kicker {
  margin: 0 0 5px;
  color: var(--cook-accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.cook-title {
  margin: 0 0 7px;
  font-size: 20px;
  line-height: 1.25;
}

.cook-copy {
  max-width: 760px;
  margin: 0;
  color: var(--cook-muted);
  font-size: 14px;
  line-height: 1.55;
}

.cook-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cook-button {
  min-height: 42px;
  border: 1px solid var(--cook-border);
  border-radius: 7px;
  background: var(--cook-surface);
  color: var(--cook-text);
  cursor: pointer;
  padding: 0 15px;
  font: 700 14px/1.2 Arial, sans-serif;
  white-space: nowrap;
}

.cook-button:hover {
  transform: translateY(-1px);
}

.cook-button:focus-visible,
.cook-switch input:focus-visible + span {
  outline: 3px solid rgba(155, 123, 66, 0.38);
  outline-offset: 3px;
}

.cook-button.is-primary {
  border-color: #1f1b16;
  background: #1f1b16;
  color: #fff;
}

.cook-button.is-gold {
  border-color: var(--cook-accent);
  background: var(--cook-accent);
  color: #fff;
}

.cook-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  display: none;
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  overflow: hidden;
  transform: translate(-50%, -50%);
  border-radius: var(--cook-radius);
}

.cook-root.is-modal .cook-modal {
  display: flex;
  flex-direction: column;
}

.cook-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--cook-border);
}

.cook-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--cook-border);
  border-radius: 50%;
  background: var(--cook-surface);
  color: var(--cook-text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.cook-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 22px;
}

.cook-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--cook-border);
}

.cook-category:last-of-type {
  border-bottom: 0;
}

.cook-category h3 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.cook-category p {
  margin: 0;
  color: var(--cook-muted);
  font-size: 13px;
  line-height: 1.5;
}

.cook-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cook-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cook-switch span {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: #d7d1c7;
  transition: background 150ms ease;
}

.cook-switch span::after {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-start: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 150ms ease;
}

.cook-switch input:checked + span {
  background: var(--cook-accent);
}

.cook-switch input:checked + span::after {
  transform: translateX(22px);
}

[dir="rtl"] .cook-switch input:checked + span::after,
.cook-root[dir="rtl"] .cook-switch input:checked + span::after {
  transform: translateX(-22px);
}

.cook-switch input:disabled + span {
  background: #1f1b16;
  opacity: 0.7;
}

.cook-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
}

.cook-manage {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  display: none;
  min-height: 38px;
  border: 1px solid var(--cook-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--cook-text);
  cursor: pointer;
  padding: 0 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  font: 700 13px/1.2 Arial, sans-serif;
}

.cook-root.is-saved .cook-manage {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 760px) {
  .cook-banner-grid {
    grid-template-columns: 1fr;
  }

  .cook-actions,
  .cook-modal-actions {
    justify-content: stretch;
  }

  .cook-button {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .cook-banner {
    width: calc(100vw - 20px);
    margin-bottom: 10px;
    padding: 15px;
  }

  .cook-category {
    grid-template-columns: 1fr;
  }

  .cook-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
}
