@import url("font/font.css");

/* GENERAL */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  margin: 0;
  overflow: hidden;
}

html {
  background-color: #ffffff;
}

body {
  background-color: #f4f4f5;
  color: #333333;
  font-family: "Book", sans-serif;
  font-synthesis: none;
}

h1,
h2,
p {
  margin: 0;
  font-weight: normal;
}

button {
  font-family: inherit;
  cursor: pointer;
}


/* TOP NAVIGATION */

nav {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;

  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;

  width: 100%;
  height: calc(45px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);

  background-color: #ffffff;
  border-bottom: 1px solid #dddddd;

  font-family: "Medium", sans-serif;
}

nav h1 {
  position: static;
  margin-bottom: 4px;

  font-family: "Medium", sans-serif;
  font-size: 15px;
  line-height: 24px;
  font-weight: normal;
}

nav h1.ostalippu {
  justify-self: center;
  color: #333333;
}

nav h1.lippusi {
  justify-self: center;
  color: #007ac9;
}

nav hr {
  position: absolute;
  left: 40px;
  bottom: 0;

  width: 34%;
  height: 3px;
  margin: 0;

  border: none;
  background-color: #007ac9;
}


/* SCROLLABLE PAGE */

.scroll-area {
  position: fixed;
  top: calc(45px + env(safe-area-inset-top));
  right: 0;
  bottom: 84px;
  left: 0;

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

  padding: 20px 0 40px;
}

.settings {
  width: calc(100% - 25px);
  max-width: 360px;
  margin: 0 auto;
}


/* SETTINGS SECTIONS */

.section {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.section h2 {
  font-family: "Medium", sans-serif;
  font-size: 15px;
  line-height: 20px;
  color: #333333;

  margin-bottom: 12px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin-bottom: 12px;
}

.color-status {
  flex-shrink: 0;
  font-family: "Medium", sans-serif;
  font-size: 12px;
}

.status-manual {
  color: #d90349;
}

.status-updated {
  color: #00985f;
}


/* TICKET COLOR SWATCHES */

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.color-swatch {
  width: 32px;
  height: 32px;

  padding: 0;

  border: 2px solid transparent;
  border-radius: 50%;
}

.color-swatch.active {
  border-color: #333333;
  box-shadow: 0 0 0 2px #ffffff inset;
}

.color-swatch:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.3;
}

.color-swatch.active:disabled {
  filter: none;
  opacity: 1;
}


/* TICKET LIST */

.ticket-list {
  display: flex;
  flex-direction: column;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 10px 0;

  border-bottom: 1px solid #eeeeee;
}

.ticket-row:last-child {
  border-bottom: none;
}

.ticket-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-row-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-label {
  font-family: "Medium", sans-serif;
  font-size: 13px;
  color: #333333;
}

.age-toggle {
  display: flex;
  flex: 1;

  border: 1px solid #dddddd;
  border-radius: 999px;

  overflow: hidden;
}

.age-btn {
  flex: 1;

  padding: 8px 4px;

  border: none;
  background-color: #ffffff;
  color: #666666;

  font-family: "Book", sans-serif;
  font-size: 12px;
}

.age-btn.active {
  background-color: #007ac9;
  color: #ffffff;
  font-family: "Medium", sans-serif;
}

.zone-select {
  flex-shrink: 0;
  width: 90px;

  padding: 8px 10px;

  border: 1px solid #dddddd;
  border-radius: 999px;
  background-color: #ffffff;
  color: #333333;

  font-family: "Medium", sans-serif;
  font-size: 12px;
}

.remove-btn {
  flex-shrink: 0;

  width: 24px;
  height: 24px;

  border: none;
  border-radius: 50%;
  background-color: #f4f4f5;
  color: #999999;

  font-size: 16px;
  line-height: 1;
}

.remove-btn:disabled {
  visibility: hidden;
}


/* ADD TICKET */

.add-ticket-btn {
  width: 100%;
  margin-top: 12px;

  padding: 10px 0;

  border: 1px dashed #007ac9;
  border-radius: 10px;
  background-color: transparent;
  color: #007ac9;

  font-family: "Medium", sans-serif;
  font-size: 13px;
}

.add-ticket-btn .plus {
  margin-right: 4px;
  font-family: "Bold", sans-serif;
}


/* SHARED INFORMATION */

.info-section p {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 20px;
}

.community-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 18px;
}

.community-button,
.admin-link {
  border: 1px solid #007ac9;
  border-radius: 999px;
  padding: 8px 15px;
  background-color: #ffffff;
  color: #007ac9;
  font-family: "Medium", sans-serif;
  font-size: 13px;
  text-decoration: none;
}

.admin-link {
  display: block;
  width: fit-content;
  margin: 0 auto 20px;
  padding: 6px 12px;
  border-color: #cccccc;
  color: #666666;
  font-size: 12px;
}

.hidden {
  display: none !important;
}


/* BOTTOM BAR */

.bottom-bar {
  position: fixed;
  z-index: 1000;
  bottom: 0;
  left: 0;

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

  width: 100%;
  height: 84px;

  background-color: #ffffff;
  border-top: 1px solid #dddddd;
}

.buy-btn {
  width: calc(100% - 50px);
  max-width: 310px;
  height: 46px;

  border: none;
  border-radius: 23px;
  background-color: #007ac9;
  color: #ffffff;

  font-family: "Medium", sans-serif;
  font-size: 16px;
}
