/* cheery-dialog — custom modal dialogs (confirm / alert / prompt).
   Replaces the browser-native confirm()/alert()/prompt() everywhere. */

.cd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.cd-overlay.cd-open {
  opacity: 1;
}

.cd-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 22px 22px 18px;
  box-sizing: border-box;
  transform: translateY(6px);
  transition: transform 0.12s ease;
}
.cd-overlay.cd-open .cd-box {
  transform: translateY(0);
}

.cd-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1d2b24;
}
.cd-message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #44544c;
  white-space: pre-wrap;
  word-break: break-word;
}

.cd-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d6ddd8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1d2b24;
  outline: none;
}
.cd-input:focus {
  border-color: #19af75;
}

.cd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cd-btn {
  appearance: none;
  border: 0;
  border-radius: 20px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cd-btn-cancel {
  background: #fff;
  color: #44544c;
  border: 1px solid #d6ddd8;
}
.cd-btn-cancel:hover {
  background: #f1f4f2;
}
.cd-btn-confirm {
  background: #19af75;
  color: #fff;
}
.cd-btn-confirm:hover {
  background: #148f60;
}
.cd-btn-confirm.cd-danger {
  background: #d24a43;
}
.cd-btn-confirm.cd-danger:hover {
  background: #b53b35;
}
