/* OrigAI shared settings final */
.origai-final-settings-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.origai-final-setting-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.origai-final-setting-button small {
  color: #6b7280;
}

.origai-final-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(17, 24, 39, .22);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    opacity .26s cubic-bezier(.16, 1, .3, 1),
    backdrop-filter .26s cubic-bezier(.16, 1, .3, 1);
}

.origai-final-overlay.show {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.origai-final-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-height: min(78vh, 680px);
  overflow: auto;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #eef0f4;
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
  padding: 18px;
  transform: translateY(28px) scale(.98);
  opacity: 0;
  transition:
    transform .30s cubic-bezier(.16, 1, .3, 1),
    opacity .24s ease;
}

.origai-final-overlay.show .origai-final-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.origai-final-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.origai-final-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: #111827;
}

.origai-final-head p {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.origai-final-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
}

.origai-final-content {
  display: grid;
  gap: 10px;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.origai-final-row {
  min-height: 46px;
  border: 1px solid #eef0f4;
  border-radius: 16px;
  background: #ffffff;
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.origai-final-row small {
  color: #6b7280;
}

.origai-final-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  outline: 0;
  font: inherit;
  line-height: 1.6;
}

.origai-final-primary {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  background: #111827;
  color: #ffffff;
  padding: 0 14px;
  cursor: pointer;
}

.origai-final-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 99999;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  background: rgba(17, 24, 39, .92);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  transition:
    opacity .18s ease,
    transform .18s cubic-bezier(.16, 1, .3, 1);
}

.origai-final-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

html.origai-font-large body {
  font-size: 17px;
}

@media (min-width: 760px) {
  .origai-final-panel {
    left: auto;
    right: 28px;
    bottom: 28px;
    width: min(520px, calc(100vw - 56px));
  }
}
