.ocma-shell,
.ocma-floating {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

.ocma-shell[hidden],
.ocma-floating[hidden],
.ocma-preferences[hidden],
.ocma-button[hidden] {
  display: none;
}

.ocma-shell {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  align-items: end;
  justify-items: end;
  padding: 22px;
  pointer-events: none;
}

.ocma-shell::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 38vh;
  background: linear-gradient(180deg, rgb(23 17 13 / 0%), rgb(23 17 13 / 18%));
  pointer-events: none;
}

.ocma-panel {
  position: relative;
  width: min(560px, calc(100vw - 44px));
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 22px;
  color: #251c17;
  background:
    linear-gradient(135deg, rgb(255 253 248 / 96%), rgb(247 240 230 / 94%)),
    #fffaf4;
  border: 1px solid rgb(214 176 115 / 42%);
  border-radius: 8px;
  box-shadow: 0 18px 54px rgb(31 21 15 / 18%), 0 1px 0 rgb(255 255 255 / 68%) inset;
  pointer-events: auto;
  transform-origin: 92% 100%;
  animation: ocma-panel-in 520ms cubic-bezier(0.18, 0.9, 0.24, 1) both;
  backdrop-filter: blur(14px);
}

.ocma-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #c89d5c, #f0d8a7, #8d5f3b);
}

.ocma-panel::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 72px;
  height: 72px;
  border: 1px solid rgb(200 157 92 / 18%);
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
}

.ocma-copy {
  position: relative;
  z-index: 1;
  padding-right: 52px;
}

.ocma-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: #8a6640;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ocma-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c89d5c;
  box-shadow: 0 0 0 5px rgb(200 157 92 / 14%);
}

.ocma-panel h2 {
  max-width: 430px;
  margin: 0 0 9px;
  color: #241b16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.14;
  font-weight: 500;
}

.ocma-panel p {
  max-width: 470px;
  margin: 0;
  color: #62564f;
  font-size: 13px;
  line-height: 1.55;
}

.ocma-link {
  display: inline-flex;
  margin-top: 11px;
  color: #744d31;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgb(116 77 49 / 36%);
  text-underline-offset: 4px;
}

.ocma-preferences {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  animation: ocma-preferences-in 260ms ease both;
}

.ocma-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(80 55 39 / 10%);
  border-radius: 8px;
}

.ocma-choice strong,
.ocma-choice small {
  display: block;
}

.ocma-choice strong {
  color: #241a15;
  font-size: 13px;
}

.ocma-choice small {
  margin-top: 4px;
  color: #685c54;
  font-size: 11px;
  line-height: 1.42;
}

.ocma-choice input {
  position: relative;
  width: 40px;
  height: 23px;
  appearance: none;
  cursor: pointer;
  border-radius: 999px;
  background: #d7cabd;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.ocma-choice input::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgb(0 0 0 / 16%);
  transition: transform 180ms ease;
}

.ocma-choice input:focus-visible,
.ocma-button:focus-visible,
.ocma-floating:focus-visible {
  outline: 2px solid #c89d5c;
  outline-offset: 3px;
}

.ocma-choice input:checked {
  background: #7b5538;
  box-shadow: 0 0 0 3px rgb(123 85 56 / 12%);
}

.ocma-choice input:checked::after {
  transform: translateX(17px);
}

.ocma-choice input:disabled {
  cursor: not-allowed;
  opacity: 0.76;
}

.ocma-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ocma-button,
.ocma-floating {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ocma-button {
  padding: 0 14px;
}

.ocma-button:hover,
.ocma-floating:hover {
  transform: translateY(-1px);
}

.ocma-button--primary {
  color: #fffaf4;
  background: #241b16;
  box-shadow: 0 10px 24px rgb(36 27 22 / 18%);
}

.ocma-button--primary:hover {
  background: #3a2a21;
}

.ocma-button--secondary {
  color: #32251d;
  background: rgb(226 214 200 / 76%);
}

.ocma-button--secondary:hover {
  background: rgb(216 202 185 / 92%);
}

.ocma-button--ghost {
  color: #6f4b33;
  background: rgb(255 255 255 / 40%);
  border-color: rgb(111 75 51 / 18%);
}

.ocma-button--ghost:hover {
  border-color: rgb(111 75 51 / 34%);
}

.ocma-floating {
  position: fixed;
  left: 18px;
  bottom: 16px;
  z-index: 99998;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  color: transparent;
  background: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.ocma-floating__icon {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgb(26 17 12 / 18%));
  pointer-events: none;
}

@keyframes ocma-panel-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes ocma-preferences-in {
  from {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ocma-panel,
  .ocma-preferences {
    animation: none;
  }

  .ocma-button,
  .ocma-floating,
  .ocma-choice input,
  .ocma-choice input::after {
    transition: none;
  }
}

@media (max-width: 760px) {
  .ocma-shell {
    align-items: end;
    justify-items: stretch;
    padding: 10px;
  }

  .ocma-shell::before {
    height: 52vh;
    background: linear-gradient(180deg, rgb(23 17 13 / 0%), rgb(23 17 13 / 28%));
  }

  .ocma-panel {
    width: 100%;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 18px;
  }

  .ocma-copy {
    padding-right: 38px;
  }

  .ocma-panel h2 {
    font-size: 22px;
  }

  .ocma-actions {
    justify-content: stretch;
  }

  .ocma-button {
    flex: 1 1 100%;
  }

  .ocma-floating {
    left: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
    min-height: 48px;
  }

  .ocma-floating__icon {
    width: 48px;
    height: 48px;
  }
}
