.overlay.hidden {
  display: none;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}
.overlay-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1vmin;
  align-items: center;
  justify-items: center;
  height: 100%;
  padding: 3vmin;
}

.resources-pane,
.details-card {
  height: 100%;
  width: 100%;
  background-color: var(--white-colour);
  border-radius: 1vmin;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: 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, rgba(0, 0, 0, 0.2) 0 3.5vmin 0 -2vmin;
}

.details-card {
  background-color: var(--dark-colour);
  justify-content: space-between;
}

/* --------------------------------- DETAILS -------------------------------- */

.details-header,
.details-footer {
  width: 100%;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 2vmin;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3vmin 0;
}

.details-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: none;
}

.details-footer .detail-card-button {
  width: 80%;
}

.details-header h2 {
  color: var(--light-colour);
  text-align: center;
  text-wrap: balance;
}

.details-card-notes {
  width: 80%;
  height: 30vmin;
  display: grid;
}

.details-card-note {
  width: 100%;
  height: 100%;
  background-color: var(--light-colour);
  box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px -2px,
    rgba(9, 30, 66, 0.08) 0px 0px 0px 1px;
  grid-column: 1/2;
  grid-row: 1/2;
  border-radius: 0.25vmin;
}

#list-notes {
  width: 100%;
  height: 100%;
  grid-column: 1/2;
  grid-row: 1/2;
  z-index: 4;
  border: none;
  background-color: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2vmin 3vmin;
  font-size: 1.75vmin;
  color: var(--grey-colour);
  resize: none;
  outline: none;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Enhanced placeholder for contenteditable */
#list-notes[data-empty='true']::before {
  content: attr(data-placeholder);
  color: var(--grey-colour);
  opacity: 0.7;
  pointer-events: none;
  font-style: italic;
}

#list-notes:focus[data-empty='true']::before {
  opacity: 0.5;
}

/* Activity links styling */
.activity-link {
  color: var(--black-colour);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.25vmin 0.25vmin;
}

.activity-link:hover {
  box-shadow: inset 100px 0 0 0 var(--yellow-colour);
}

.details-card-note:nth-of-type(1) {
  rotate: 1.5deg;
  background-color: var(--white-colour);
}

.details-card-note:nth-of-type(2) {
  rotate: -1.5deg;
}

.details-card-note:nth-of-type(3) {
  z-index: 3;
}

/* ----------------------------- DETAIL CARD BTN ---------------------------- */

.details-card-buttons,
.share-code-holder {
  height: fit-content;
  display: grid;
  width: 80%;
  grid-template-columns: 1fr 1fr;
  gap: 2vmin;
  padding: 2vmin;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 1vmin;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.share-code-holder {
  background-color: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 8vmin;
  position: relative;
}

.share-code-holder p:hover:not(#share-code-label) {
  text-decoration: underline;
}

.share-code-holder p {
  font-size: 6vmin;
  font-weight: 900;
  color: var(--white-colour);
}

#share-code-label {
  font-size: 1.5vmin;
  font-weight: 900;
  color: var(--light-colour);
  opacity: 0.9;
  text-transform: uppercase;
  position: absolute;
  top: -1.25vmin;
  user-select: none;
}

.detail-card-button {
  background-color: var(--light-colour);
  min-width: 40%;
  min-height: 5vmin;
  border: none;
  border-top: 1px solid #fff;
  display: grid;
  align-items: center;
  justify-items: center;
  grid-template-columns: 20% 1% 79%;
  grid-template-rows: 1fr;
  box-shadow: rgba(0, 0, 0, 0.2) 0px -0.25vmin 0px inset;
  cursor: pointer;
  border-radius: 0.5vmin;
  user-select: none;
}

#delete-list-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: 0.25vmin solid var(--light-colour);
  box-shadow: none;
}

#delete-list-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#delete-list-btn p {
  color: var(--light-colour);
}

#delete-list-btn svg {
  fill: var(--light-colour);
}

.detail-card-div {
  width: 2px;
  height: 100%;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-card-button p {
  color: var(--dark-colour);
  font-size: 1.5vmin;
  font-weight: 300;
  text-transform: uppercase;
  white-space: wrap;
  text-align: center;
  padding: 0 1vmin;
}

.detail-card-button svg {
  fill: var(--dark-colour);
  width: 2vmin;
  height: 2vmin;
  aspect-ratio: 1;
}

.detail-card-button:hover {
  background-color: #fff;
}

#item-count {
  font-weight: 900 !important;
  font-size: 2vmin;
}

#activity-lock-select {
  padding: 1vmin 2vmin;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.open-with-label {
  text-transform: uppercase;
  font-size: 1.25vmin !important;
  font-weight: 500 !important;
  color: var(--grey-colour);
}

#display-share-code,
#display-share-code-dialog {
  letter-spacing: 0.25vmin;
}

#display-share-code-dialog {
  background-color: var(--white-colour);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1vmin 3vmin;
  border-radius: 1vmin;
}

/* -------------------------------- RESOURCES ------------------------------- */

.resources-header h2 {
  margin: 0;
  font-size: 3vmin;
  width: fit-content;
  white-space: nowrap;
  font-weight: 900;
}

.resources-header {
  width: 90%;
  display: flex;
  column-gap: 2vmin;
  margin-top: 2vmin;
  margin-bottom: 2vmin;
}
#resource-search {
  width: 100%;
  padding: 1vmin;
  background-color: var(--light-colour);
  border-radius: 0.5vmin;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 1.5vmin;
}
.focused-list-view {
  padding: 1vmin;
  overflow: auto;
}

.small-vertical-divider {
  width: 1px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 1069px) {
  .overlay-shell {
    grid-template-columns: 96vw;
    grid-template-rows: auto auto;
    align-content: center;
    justify-content: center;
  }
  .resources-pane {
    order: -1;
  }
  .details-card {
    width: 96vw;
    row-gap: 4vmin;
    padding: 2vmin 0;
  }
  .details-card-notes,
  .details-header {
    display: none;
  }
  .details-footer {
    padding: 0;
    background-color: transparent;
    border: none;
  }
  .details-footer .detail-card-button {
    width: 40%;
  }
}

#favourite-btn {
  background-color: #ccc;
}

#favourite-btn svg {
  fill: rgba(0, 0, 0, 0.15);
  margin-top: 2px;
}

.favourite-active {
  background: var(--dark-colour) !important;
  color: var(--white-colour) !important;
  border: none !important;
}

.favourite-active svg {
  fill: #fff !important;
}
