/* -----------------------------------BEGIN DOLL CANVAS----------------------------------- */
* {
  box-sizing: border-box;
}

body.canvas-page {
  margin: 0;
  font-family: Inter;
  display: flex;
  background: #013539;
  font-weight: bold;
}

/* SIDEBAR */
#sidebar {
  width: 350px;
  height: 100vh;

  display: flex;
  flex-direction: column;

  padding: 10px;

  background: #1e4856;
  border-right: 3px solid #99bd25;

  overflow: hidden;
  box-sizing: border-box;
}

/* CANVAS */
#canvas {
  flex: 1;
  position: relative;
  height: 100vh;
  background-color: #0f1517;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: hidden;
}

.doll .resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  right: 0;
  bottom: 0;
  background: red;
  cursor: nwse-resize;
  z-index: 10000;
}

.doll.selected {
  outline: 2px dashed #ff4d4d;
}

.doll {
  position: absolute;
  cursor: grab;
}

.doll img {
  width: 250px;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: red;
  color: white;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.delete-btn:hover {
  background: #99bd25;
  color: #013539;
}

/* SEARCH */
#search {
  width: 100%;
  padding: 10px;
  background: #013539;
  color: white;
  border: 2px solid #99bd25;
  border-radius: 24px;
  outline: none;
  transition: 0.2s;
}

#search-wrap {
  position: relative;
  width: 100%;
}

#search:focus {
  border-color: #a6bc71;
  box-shadow: 0 0 10px rgba(166, 188, 113, 0.35);
}

#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #013539;
  border-radius: 20px;
  max-height: 180px;
  overflow-y: auto;

  margin-top: 4px;
}

.suggestion {
  padding: 10px 14px;
  cursor: pointer;
  color: white;
  font-weight: normal;
}

.suggestion:hover {
  background: #a6bc71;
  color: #013539;
}

#search-wrap,
#filters,
.filter-label {
  flex-shrink: 0;
}

/* BUTTONS */
#filters button {
  margin: 4px;
  padding: 8px 12px;
  min-width: 100px;
  background: #013539;
  color: white;
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.2s;
}

#filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
}

#filters button:hover {
  background: #356108;
}

#list {
  flex: 1;

  overflow-y: auto;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  gap: 5px;

  min-height: 0;
  padding-right: 5px;
}

.active-view,
.active-filter,
.active-list {
  background: #99bd25 !important;
  color: #013539 !important;
  font-weight: bold;
}

.btn-view {
  text-transform: capitalize !important;
}

.btn-clear {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background: #99bd25;
  color: #013539;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-clear:hover {
  background: #a6bc71;
}

.btn-doll {
  position: relative;

  width: 100%;
  height: 55px;

  padding: 10px 15px 10px 15px;

  background: #013539;
  color: white;

  border: none;
  border-radius: 16px;

  cursor: pointer;

  display: flex;
  flex-direction: column;

  align-items: flex-start;

  text-align: left;

  transition: .2s;
}

.btn-doll:hover {
  background: #356108;
}

.active-list .head-info {
  color: #013539;
}

.active-list .body-info {
  color: #1E4856;
}

.active-list .info-trigger-btn {
  background: #013539;
  color: #99BD25;
}

.active-list .info-trigger-btn:hover {
  background: #1E4856;
  color: white;
}

.filter-label {
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #a6bc71;
  color: #a6bc71;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  width: 100%;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-line {
  display: block;
  width: 100%;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.head-info {
  font-size: 14px;
  font-weight: 700;

  color: white;
}

.body-info {
  font-size: 12px;
  margin-top: 5px;
  color: #A6BC71;
}

.info-trigger-btn {
  position: absolute;

  right: 12px;
  top: 50%;

  transform: translateY(-50%);

  width: 24px;
  height: 24px;

  border: none;
  border-radius: 50%;

  background: rgba(153, 189, 37, .25);
  color: white;

  font-weight: bold;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: .2s;
}

.info-trigger-btn:hover {
  background: rgba(153, 189, 37, .5);
}

/* MODAL */

.modal-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;

  width: 100vw;
  height: 100vh;

  background: rgba(0, 0, 0, .65);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: .2s;

  z-index: 50000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.info-modal {
  position: fixed;

  left: 370px;
  top: 30%;

  transform: translateY(-50%);
  width: 450px;
  max-width: 90vw;

  background: #1E4856;
  color: white;

  border-radius: 16px;

  padding: 24px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 16px;
  padding-bottom: 12px;

  border-bottom: 1px solid #013539;
}

.modal-title {
  margin: 0;

  color: #99BD25;
  font-size: 24px;
}

.modal-field {
  font-weight: normal;
  margin-bottom: 16px;
  line-height: 1.5;
}

.modal-field strong {
  display: block;
  text-transform: uppercase;
  margin-bottom: 4px;

  color: #A6BC71;

  font-size: 12px;

  letter-spacing: 1px;
}

.badge {
  background: #99BD25;
  color: #013539;

  padding: 4px 10px;

  border-radius: 20px;

  font-size: 12px;
  font-weight: bold;
}

.close-modal-btn {
  width: 100%;

  padding: 10px;

  border: none;
  border-radius: 10px;

  background: #013539;
  color: white;

  cursor: pointer;
}

.close-modal-btn:hover {
  background: #356108;
}

.info-trigger-btn {
  background: rgba(153, 189, 37, .25);
}

.info-trigger-btn:hover {
  background: rgba(153, 189, 37, .5);
}

.modal-divider {
  border: none;
  height: 1px;

  background: #013539;

  margin: 16px 0;
}

.modal-attribution {
  color: #A6BC71;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 16px;
}

/* -----------------------------------END DOLL CANVAS----------------------------------- */
