/* dialogs.css – Dialogs: add your own book, account, delete account, legacy import */

#cb {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#cb[hidden] {
  display: none;
}
#cbf {
  background: var(--pan2);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 20px;
  max-width: 660px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.cbl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cbcv {
  display: block;
  cursor: pointer;
}
.cbcv .cover {
  width: 100%;
}
.cbcv .ph {
  font: 600 12px/1.3 var(--sans);
  color: var(--phInk);
  border: 1px dashed var(--edge);
}
.cbr {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.cbr h2 {
  font: 700 20px var(--serif);
}
.fld {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--mute);
}
.in {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  background: var(--bg);
  color: var(--ink);
  font: 14px var(--sans);
}
textarea.in {
  resize: vertical;
}
.cb2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cbx {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 640px) {
  #cbf {
    grid-template-columns: 1fr;
  }
  .cbl {
    max-width: 150px;
  }
}
#accm {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#accm form {
  background: var(--pan2);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#accm h2 {
  font: 700 22px var(--serif);
}
#accm label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--mute);
}
#accm label.ck2 {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
#accm input:not([type="checkbox"]) {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
#accm .row2 {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
#accm .hint {
  margin: 0;
}
#accm h2.dng {
  color: #ff8a80;
}

/* ---- iPhone safe areas: keep clear of the status bar, camera cut-out and home bar ---- */
#cb,
#accm {
  padding: max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}
