@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  --seatWidth: 35px;
  --hoverColor: #dadada;
  --stageColor: #7a0404;
  --backgroundColor: #ffffff;
}

html,
body,
input,
select,
textarea,
button,
p,
span,
div,
i,
em,
img,
table,
tr,
th,
td,
strong,
a,
ul,
li,
h1,
h2,
h3,
h4,
h5,
h6,
nav,
header,
footer,
section {
  margin: 0;
  border: 0;
  padding: 0;
  border: none;
  outline: none;
  font-weight: 400;
  border-radius: 0;
  appearance: none;
  font-size: 1.05rem;
  font-style: normal;
  list-style-type: none;
  box-sizing: border-box;
  vertical-align: baseline;
  font-optical-sizing: auto;
  font-family: 'Inter', sans-serif;
  font-variation-settings: 'wdth' 100;
}

a,
button {
  transition: all 0.2s ease-in-out;
}

button {
  cursor: pointer;
  background-color: transparent;
}

strong {
  font-weight: 600;
}

header {
  margin-bottom: 20px;
}

header input {
  padding: 10px;
  max-width: 350px;
  border-radius: 10px;
  border: 1px solid var(--hoverColor);
}

/* Buttons */
.button {
  color: #000000;
  padding: 10px 20px;
  border-radius: 10px;
}

.mini-button {
  display: flex;
  cursor: pointer;
  min-width: var(--seatWidth);
  min-height: var(--seatWidth);
  font-size: 0.6em;
  color: var(--backgroundColor);
  user-select: none;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  --webkit-user-select: none;
  background-color: var(--backgroundColor);
  border: 1px solid var(--hoverColor);
  transition: all 0.2s ease-in-out;
}

.mini-button:hover {
  background-color: var(--hoverColor);
}

.button:active,
.mini-button:active {
  opacity: 0.8;
}

.mini-button.active {
  background-color: var(--hoverColor);
}

.mini-button span {
  font-size: 1.5em;
  color: #444444;
}

.button.gray {
  background-color: var(--hoverColor);
}

.button.black {
  color: var(--backgroundColor);
  background-color: #222222;
}

.button.circle {
  width: 40px;
  height: 40px;
  padding: unset;
  border-radius: 50em;
  background-color: var(--backgroundColor);
}
/* End Buttons */

/* Helpers */
.no-pointer-events {
  pointer-events: none;
}

.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-gap-small {
  gap: 5px;
}

.flex-gap-normal {
  gap: 10px;
}

.flex-gap-medium {
  gap: 15px;
}

.flex-gap-large {
  gap: 20px;
}

.flex-grow {
  flex-grow: 1;
}

.flex-column {
  flex-direction: column;
}

.flex-h-center {
  justify-content: center;
}

.flex-v-center {
  align-items: center;
}

.flex-end {
  justify-content: end;
}

.flex-space-between {
  justify-content: space-between;
}

.flex-space-around {
  justify-content: space-around;
}

.relative {
  position: relative;
}

.container {
  margin: 20px;
  user-select: none;
  white-space: nowrap;
  --webkit-user-select: none;
}
/* End Helpers */

/* Seatmap */
.canvas {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.seatmap {
  overflow: auto;
  min-height: 500px;
  white-space: nowrap;
  padding-bottom: 10px;
}

.stage {
  padding: 10px 0;
  color: var(--backgroundColor);
  font-weight: 600;
  font-size: 1.6em;
  text-align: center;
  border-radius: 10px;
  margin-bottom: 20px;
  letter-spacing: 20px;
  background-color: var(--stageColor);
}

.stage input {
  padding: 10px;
  border-radius: 5px;
  background-color: var(--backgroundColor);
}

.stage button {
  background-color: var(--backgroundColor);
}
/* End Seatmap */

/* Row */
.new-row {
  margin-top: 10px;
}

.row {
  height: 48px;
  padding: 6px 0;
}

.row-label {
  display: flex;
  min-width: 70px;
  min-height: 30px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
}

.row-label:not(button) span {
  font-size: 1.1em;
}

.row-buttons {
  margin-right: 10px;
}

.seat-buttons {
  margin-left: 10px;
}
/* End Row */

/* Seat */
.seat,
.space {
  display: flex;
  cursor: pointer;
  min-width: var(--seatWidth);
  min-height: var(--seatWidth);
  font-size: 0.6em;
  user-select: none;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  --webkit-user-select: none;
  background-color: var(--backgroundColor);
  transition: all 0.2s ease-in-out;
}

.seat {
  color: #111111;
  border: 1px solid #222222;
  border-bottom: 5px solid #222222;
}

.seat:hover {
  background-color: var(--hoverColor);
}

.seat:active {
  opacity: 0.8;
}

.seat.active {
  color: var(--backgroundColor);
  background-color: var(--stageColor);
  border-bottom: 5px solid red;
}

.space {
  color: var(--backgroundColor);
  border: 1px solid var(--backgroundColor);
}

.space:hover {
  background-color: var(--hoverColor);
}

.space:active {
  opacity: 0.8;
}

.space.active {
  background-color: var(--hoverColor);
}

.seat.preview,
.space.preview {
  cursor: inherit;
}

.seat.preview:hover,
.space.preview:hover {
  background-color: var(--backgroundColor);
}

.seat.preview:active,
.space.preview:active {
  opacity: 1;
  background-color: var(--backgroundColor);
}

.seat.occupied {
  opacity: 0.4;
  pointer-events: none;
}
/* End Seat */

/* Legend */
.legend {
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 10px;
  user-select: none;
  position: absolute;
  width: fit-content;
  margin-inline: auto;
  border-radius: 10px;
  --webkit-user-select: none;
  background-color: var(--hoverColor);
}

.legend * {
  font-size: 0.8em;
}

.legend strong {
  font-size: 1em;
}

.legend .seat {
  cursor: default;
  min-width: 25px;
  min-height: 25px;
  pointer-events: none;
}

.legend .seat:active {
  opacity: 1;
}
/* End Legend */

/* Dropdown */
.dropdown {
  z-index: 9999;
  min-width: 180px;
  position: absolute;
  border-radius: 5px;
  border: 1px solid var(--backgroundColor);
  background-color: #222222;
}

.dropdown.top-left {
  right: 0;
  bottom: 41px;
}

.dropdown.top-right {
  left: 0;
  bottom: 41px;
}

.dropdown.bottom-left {
  top: 40px;
  right: 0;
}

.dropdown.bottom-right {
  left: 0;
  top: 40px;
}

.dropdown button {
  display: flex;
  color: var(--backgroundColor);
  font-size: 0.8em;
  text-align: left;
  align-items: center;
  padding: 8px 15px 8px 10px;
}

.dropdown button span {
  font-size: 1.25em;
  margin-right: 5px;
}

.dropdown button:first-child {
  padding-top: 10px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.dropdown button:last-child {
  padding-bottom: 10px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.dropdown button:hover {
  background-color: #333333;
}

.dropdown button:active {
  opacity: 0.6;
}

.dropdown button.active {
  background-color: #333333;
}

.dropdown-form {
  padding: 10px;
  background-color: #333333;
  border-top: 1px solid #111111;
}

.dropdown-form input {
  width: 100%;
  padding: 10px;
  font-size: 0.8em;
  font-weight: 600;
  text-align: center;
  border-radius: 5px;
}

.dropdown-form button {
  width: 100%;
  padding: 10px;
  font-weight: 600;
  border-radius: 5px;
  justify-content: center;
  background-color: #000000;
}

.dropdown-form button:hover {
  background-color: #222222;
}
/* End Dropdown */

/* Preview */
.close-button {
  top: 65px;
  right: 17px;
  z-index: 999999;
  position: absolute;
}

.close-button button {
  margin-bottom: 5px;
}

.controls {
  top: 150px;
  right: 17px;
  z-index: 99999;
  position: absolute;
}

.controls button {
  margin-top: 5px;
}

.controls button:active,
.close-button button:active {
  opacity: 0.7;
}
/* End Preview */

.buttons {
  margin: 10px 0 40px 0;
}

.react-tooltip {
  font-size: 0.7em !important;
}

.react-tooltip * {
  font-size: 1.05em;
  line-height: 160%;
  text-align: center;
}

.drag-handle {
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

@media (max-width: 600px) {
  header input {
    max-width: 180px;
    font-size: 0.9em;
  }

  .stage input {
    max-width: 120px;
  }

  .buttons {
    flex-direction: column;
  }

  .buttons .totals {
    margin-bottom: 20px;
  }
}
