/* -------------------------------------------------------------------------- */
/*                                 LIST EDITOR                                */
/* -------------------------------------------------------------------------- */

.quick-create-panel-top {
  height: 15vh;
  height: 15svh;
  width: 100%;
  background-color: var(--light-colour);
  display: flex;
  justify-content: space-evenly;
  padding: 0 6vmin;
  flex-direction: row;
  align-items: center;
  box-shadow: rgba(0, 0, 0, 0.2) 0 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.15) 0 0.35vmin 0.6vmin -0.15vmin,
    rgba(0, 0, 0, 0.1) 0 -0.3vmin 0 inset;
}

.quick-create-panel-top .top-title {
  width: 100%;
  text-align: center;
  color: var(--dark-colour);
  font-size: 5vmin;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-create-panel-top .circleButton {
  height: 7vmin;
  width: 7vmin;
  background-color: var(--dark-colour);
}

.quick-create-panel-mid {
  height: fit-content;
  width: 100%;
  background-color: var(--white-colour);
  display: flex;
  justify-content: space-evenly;
  padding: 2vmin;
  flex-direction: column;
  align-items: center;
}

.the-list-section {
  height: 73.75vh;
  height: 73.75svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  row-gap: 2vmin;
}

.quick-create-panel-btm {
  height: fit-content;
  width: 100%;
  background-color: var(--light-colour);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-evenly;
  padding: 2vmin;
  flex-direction: row;
  align-items: center;
}

/* ---------- Quick List (single-column spreadsheet) ---------- */

.ql {
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.05);
  overflow-x: hidden;
  overflow-y: auto;
  counter-reset: row;
  font-size: 2vmin;
  font-weight: 300;
  max-height: 100%;
}

/* Each row is editable content with a fixed number gutter on the left */
.ql-row {
  position: relative;
  min-height: 6.05vmin;
  padding: 1.5vmin 1.2vmin 0.9vmin 5vmin; /* top/right/bottom/left */
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
  outline: none;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  display: block; /* ✅ block, not flex */
  border: none;
}

.ql-row,
.ql-cell {
  -webkit-user-modify: read-write-plaintext-only;
}

.ql-row:nth-child(odd) {
  background: var(--white-colour);
}

.ql-row:focus {
  background: #f8efba; /* subtle focus */
}

/* Visible row number (not draggable itself; the pad below handles drag) */
.ql-row::before {
  counter-increment: row;
  content: counter(row);
  position: absolute;
  left: 0;
  top: -0.1vmin;
  width: 5vmin;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-size: 1.75vmin;
}

/* Placeholder style for the very first empty row */
.ql-row.placeholder {
  color: rgba(0, 0, 0, 0.45);
}

/* Invisible drag pad that sits over the number area.
   This is the SortableJS handle so it *feels* like you're dragging the number. */
.ql-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 5vmin;
  height: 100%;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  background: transparent; /* keep it invisible */
  z-index: 1; /* above the content but below any overlays */
}

.ql-num:active {
  cursor: grabbing;
}

/* ---- SortableJS feedback ---- */
.ql-ghost {
  background: #e6f0ff !important;
  opacity: 0.85;
}
.ql-chosen {
  outline: 1px dashed rgba(0, 0, 0, 0.2);
}

#show-quick-list-panel {
  display: none;
}

.quickListHolder {
  height: 85vh;
  height: 85svh;
  padding: 2vmin;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  row-gap: 2vmin;
  width: 100%;
  background-color: var(--light-colour);
}

.quickListInstructionHolder {
  width: 100%;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 1vmin;
}

.quickListInstructionHolder h2 {
  font-size: 1.75vmin;
}

.quickListInstructionHolder .simpleButton {
  min-height: 5vmin;
}

.quickListInstructionHolder .simpleButton p {
  opacity: 1;
  font-size: 1.75vmin;
  font-weight: 500;
}

.quickListInstructionHolder p {
  opacity: 0.5;
}

.quickListInstructionHolder .countAlignRight {
  width: 100%;
  text-align: right;
}

.quickListHolder textarea {
  height: 100%;
  font-size: 1.75vmin;
  line-height: 3.5vmin;
  padding: 2vmin;
  resize: none;
  background-color: var(--white-colour);
  border: none;
  border-radius: 0.5vmin;
  box-shadow: rgba(14, 63, 126, 0.06) 0px 0px 0px 1px,
    rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px,
    rgba(42, 51, 70, 0.04) 0px 2px 2px -1px,
    rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px,
    rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px,
    rgba(42, 51, 70, 0.03) 0px 10px 10px -5px,
    rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
}

#quick-list-input:focus {
  outline-color: var(--dark-colour);
}

.quickListButtonHolder {
  display: flex;
  column-gap: 2.5vmin;
  width: 100%;
}

.quickListButtonHolder .simpleButton {
  width: 100%;
  min-height: 5.5vmin;
}

.quickListButtonHolder .simpleButton:first-of-type {
  width: 50%;
}

.quick-list-bonus-svg {
  border: 0.25vmin solid var(--dark-colour);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  width: 7.5vmin;
  height: 7.5vmin;
  aspect-ratio: 1;
  margin-top: 2vmin;
}

.quick-list-bonus-svg svg {
  width: 5vmin;
  height: auto;
  aspect-ratio: 1;
  display: block;
  margin: 12px auto;
  fill: var(--dark-colour);
}

/* ------------------------------- Input Panel ------------------------------ */

#list-name-input {
  font-size: 1.5vmin;
  text-align: center;
  padding: 1vmin;
  width: 100%;
  min-width: 350px;
  box-sizing: border-box;
  margin-top: 0.5vmin;
  margin-bottom: 2vmin;
}

#ai-prompt {
  width: 90%;
  height: 80%;
  font-size: 2vmin;
  text-align: left;
  border: none;
  padding: 0.5vh 1vmin;
  background-color: var(--white-colour);
  box-shadow: rgba(0, 0, 0, 0.01) 0px 1px 3px 0px,
    rgba(27, 31, 35, 0.1) 0px 0px 0px 1px;
  box-sizing: border-box;
  color: var(--dark-colour);
}

#ai-form-dialog input {
  height: fit-content !important;
  min-width: 50vw;
  padding: 2vh 1vmin;
  font-weight: 300;
}

#ai-form-dialog .overlayTwoButtons {
  justify-content: space-between;
}

#ai-form-dialog .overlayTwoButtons .simpleButton {
  min-height: 5vh;
}
