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

/*@import url("./kasorb.css");*/

:root {
  --charcoal-gray: #292f36;
  --sky-blue: #10b6ea;
  --olive-green: #c3d73a;
  --burnt-orange: #ef7f3f;
  --black: #000;
  --white: white;
  --golden-yellow: #f2bf18;
  --bright-blue: #3781c0;
  --crimson-red: #d21450;
  --emerald-green: #0b9444;
  --verdigris: #47bcb4;
  --raspberry-pink: #e6007e;
  --purple: #5e4d9b;
  --black--10: #0000001a;
  --charcoal-gray--20: #292f3633;
  --transparent: #fff0;
  --white--30: #ffffff4d;
  --white--20: #fff3;
  --charcoal-gray--10: #292f361a;
  --emerald-green--10: #0b94441a;
  --sky-blue--20: #10b6ea33;
  --sky-blue--10: #10b6ea1a;
  --vivid-yellow: #ffd100;
  --gray: #f9f9f9;
  --ice-blue: #3498fb;
  --white--40: #fff6;
  --green: #3bc775;
  --black--2: #00000005;
  --purple--30: #5e4d9b4d;
  --royal-purple: #4a3d7a;
  --light-purple: #c3b2ff;
  --whitesmoke: whitesmoke;
  --blue--5: #1877f20d;
  --charcoal-gray--50: #292f3680;
  --pastel-purple: #d7ccff;
  --blue: #1877f2;
  --verdigris--30: #47bcb44d;
  --raspberry-pink--30: #e6007e4d;
  --burnt-orange--20: #ef7f3f33;
  --burnt-orange--10: #ef7f3f1a;
  --emerald-green--20: #0b944433;
  --white--10: #ffffff1a;
  --color-accent-200: #ffffff;
}
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html,
  body {
    height: 100%;
    width: 100%;
    font-family: -apple-system, "Segoe UI", BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    background-color: var(--color-background);
    color: var(--color-text);
    background-image: url("/assets/img/bg.svg");
    background-repeat: no-repeat;
    background-size: cover; /* or 'contain' or custom size */
    background-position: center center;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  a {
    text-decoration: none;
    font-weight: bold;
    color: inherit;

    &:hover {
      color: var(--color-accent);
    }
  }

  ul,
  ol {
    list-style: none;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  img {
    filter: var(--brightness-filter);
  }
}

body {
  color: var(--charcoal-gray);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

input,
textarea {
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  border: 1px solid #dddddd;
}

book-app {
  display: block;
}

button {
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  background-color: #e6007e;
  border: 2px solid transparent;
  color: white;
  transition: all 0.2s ease;

  &:hover {
    background-color: white;
    color: #e6007e;
    border-color: #e6007e;
  }

  &:active {
    transform: translate(2px, 2px);
  }
}

button.secondary {
  border-color: #e6007e;
  background: transparent;
  color: #e6007e;

  &:hover {
    background: #e6007e;
    color: white;
  }

  &:active {
    transform: translate(2px, 2px);
  }
}


dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  background: #f9f9f9;
  font-family: sans-serif;

  dt {
    font-weight: bold;
    text-align: right;
  }

  dd {
    margin: 0;
  }
}

/**
 *
 */

#container {
  height: 100%;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader {
  width: 60px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side,#000 90%,#0000);
  background:
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 50%;
  animation: l3 1s infinite linear;
  opacity: 0.3;
}
@keyframes l3 {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}

h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}


@media screen and (max-width: 320px) {
  [data-flow-ui-type=full-page] [data-flow-inner] flow-ui-step {
    padding: 0;
  }
}

flow-ui-step > * {
  width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: rgb(255 255 255 / 80%);
  border-radius: 0.5rem;
  border: 1px solid var(--charcoal-gray--10);
  padding: 1.5rem;
}

@media screen and (max-width: 380px) {
  flow-ui-step > * {
    padding: 1rem;
  }
}

@media screen and (max-width: 320px) {
  flow-ui-step > * {
    width: 100%;
    border-radius: 0;
  }
}

flow-ui-step .center {
  align-items: center;
  text-align: center;
}

ks-course-search {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

ks-venue-search {
  position: relative;
}

ks-venue-search input[name="step"] {
  position: absolute;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
}

ks-venue-search gmp-place-autocomplete {
  height: 36px;
  border-radius: 8px;
  border: 1px solid #dddddd;
}

ks-venue-search .gmp-clear-cover {
  position: absolute;
  top: -7px;
  right: 1px;
  padding: 8px 0;
}

ks-venue-search .gmp-clear-cover-inside {
  width: 48px;
  height: 34px;
  border-radius: 7px;
  background-color: white;
  cursor: text;
}

ks-course-search omni-box,
ks-course-search-old input,
ks-venue-search input,
.ks-input-date {
  width: 100%;
}

.ks-input-date {
  -webkit-appearance: none;
  height: 37px;
  padding: 0.3rem 0.6rem;
  background: white;
}

ks-periodic-status {
  text-align: center;
}

fieldset[data-flow-continue] {
  display: flex;
  justify-content: space-between;
}

omni-box {
  display: block;
  margin: auto;
  overflow: hidden;
  font-family: Arial, sans-serif;

  input {
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
  }

  [data-label] {
    display: none;
  }

  .ac-suggestion {
    --icon-fill: white;
    position: absolute;
    z-index: 3;
    font-size: 13px;
    text-align: left;
    background-color: white;

    max-height: 200px;
    box-shadow: var(--box-shadow, 0 2px 6px rgba(0,0,0,.3));
    border: 0;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
    max-height: 300px;
    max-width: 500px;
    overflow-y: auto;
    z-index: 9999;

    .ac-itm {
      display: grid;
      grid-template-columns: var(--ac-itm-grid, 1fr 5rem);
      cursor: pointer;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding: 0 .8rem;
      line-height: 30px;
      height: var(--ac-itm-height, auto);
      border-bottom: 1px solid #e6e6e6;

      &:last-child {
        border-bottom: 0;
      }

      .ac-img {
        background-repeat: no-repeat;
        background-size: contain;
        width: var(--ac-itm-width, 1.1rem);
        height: var(--ac-itm-height, auto);
        display: inline-block;
      }

      &:hover {
        background-color: #fafafa;
      }

      span.text {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 100px;

        small {
          overflow: hidden;
          color: white;
          word-wrap: normal;
          display: inline-block;

        }

        .txt-hl {
          font-weight: 700;
        }
      }

      span.category {
        float: right;
        text-align: right;
        color: #aaa;
        opacity: 0.6;
        font-size: smaller;
      }

      &.selected {
        background-color: #fafafa;
      }

      &.active {
        background-color: #fafafa;
        transition: all 0.1s;
      }
    }

    display: none;

    &.active {
      display: block;
    }
  }

  &.simple {
    .ac-suggestion {
      .ac-itm {
        grid-template-columns: var(--exf-ac-itm-grid, 1px 1fr 7rem);
        grid-gap: 50px;
      }
    }
  }

  .omnibox {
    input {
      min-width: 300px;
    }
  }

  &[popup] {
    .omnibox {
      position: absolute;
       right: 30px;
      top: 10px;
      z-index: 3;

      input {
        min-width: unset;
        color: white;
        cursor: pointer;
        padding: .6rem;
        max-width: 50px;

        &::placeholder {
          color: transparent
        }

        &:focus::placeholder {
          color: #aaa;
        }

        background-color: #111;
        transition: background-color 0.2s ease;

        &:hover {
          background-color: #222;
          transition: background-color 0.2s ease;
        }

        &:focus {
          background-color: #222;
          transition: background-color 0.2s ease;
        }

        ::-webkit-search-cancel-button {
          color: white
        }
      }

      &:has(input:focus) {

        position: absolute;
        display: grid;
        align-items: center;
        text-align: center;
        left: 0;
        top: 0px;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 6;
        transition: all 0.3s ease-in-out;
        backdrop-filter: blur(8px);

        label {
          margin-top: -30vh;
        }

        svg-icon{
          display: none;
        }

        input {
          cursor: text;
          font-size: 2rem;
          max-width: 90vw;
          width: 90vw;
          box-shadow: 2px 2px 14px rgba(0, 0, 0, 1);
          border: 3px solid #666;

          &::-webkit-search-cancel-button {
            -webkit-appearance: none;
            height: 28px;
            width: 28px;
            content: url("/assets/img/close.svg");
          }
        }

      }
    }
  }

  @media only screen and (max-width: 600px) {
    body {
      &::-webkit-scrollbar {
        display: none;
      }
    }

    form.omnibox {
      right: 10px;
      top: 4px;
      transition: top 0.5s;
    }
    /*
    html {
      &[data-scroll-direction="up"] {
        header {
          top: -100px;
          transition: top 0.5s;
        }
      }
    }
    */
  }
}

/**
 * Responsive container
 */

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 calc(1.5rem * 0.5);
}

@media screen and (min-width: 576px) {
  .container {
    width: 540px;
  }
}

@media screen and (min-width: 768px) {
  .container {
    width: 720px;
  }
}

@media screen and (min-width: 992px) {
  .container {
    width: 960px;
  }
}

@media screen and (min-width: 1200px) {
  .container {
    width: 1140px;
  }
}

@media screen and (min-width: 1400px) {
  .container {
    width: 1320px;
  }
}

/**
 * Buttons
 */

.btn {
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  background: var(--charcoal-gray--50);
  border: 2px solid transparent;
  color: var(--white);
  transition: all 0.2s ease;
  font-weight: 400;
}

.btn:hover {
  background-color: white;
  color: #e6007e;
  border-color: #e6007e;
}

.btn:active {
  transform: translate(2px, 2px);
}

.btn.primary {
  background: var(--raspberry-pink);
  color: var(--white);
}

.btn.primary:hover {
  background: var(--white);
  color: var(--raspberry-pink);
  border: 2px solid var(--raspberry-pink);
  text-decoration: none;
}

flow-ui [data-flow-inner] a:link, flow-ui [data-flow-inner] a:visited {
  text-decoration: none;
  font-weight: 400;
  line-height: 29px;
}

/**
 * Header
 */

header {
  position: fixed;
  width: 100%;
  top: 2rem;
}

header .container {
  border: 1px solid var(--charcoal-gray--10);
  border-radius: 0.5rem;
  background: var(--white) url("/assets/img/logo.svg") no-repeat 10px 50%;
  box-shadow: 0 2px 15px #0000001a;
  padding: 1rem calc(1.5rem * 0.5);
}

header .container nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0 0 100px;
  height: 38px;
}

@media screen and (min-width: 576px) {
  header .container nav {
    padding: 0 0 0 150px;
  }
}

header .container nav .link {
  border-bottom: 1px solid var(--transparent);
  color: var(--charcoal-gray);
  cursor: pointer;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.3s, color 0.3s;
  text-wrap-mode: nowrap;
}

header .container nav .link-bk {
  display: none;
}

@media screen and (min-width: 768px) {
  header .container nav .link-bk-md {
    display: block;
  }
}

header .container nav a[href][aria-current="page"] {
  color: var(--verdigris);
  border-bottom-color: var(--verdigris);
}

/**
 * Progress bar
 */

ks-progress-bar {
  position: fixed;
  top: 0;
  display: block;
  height: 4px;
  background-color: var(--raspberry-pink);
  width: 0;
  transition: width 0;
}

ks-progress-bar[active] {
  width: 100%;
  transition: width 1s;
}

/**
 * Badge
 */

.badge {
  padding: 2px 4px;
  border-radius: 4px;
}

.badge-requested {
  background: var(--charcoal-gray--20);
}

.badge-confirmed {
  background: var(--green);
}

/**
 * Page requests list
 */

ks-page-requests-list .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0 calc(1.5rem * -0.5);
  overflow: hidden;
}

ks-page-requests-list .card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: rgb(255 255 255 / 80%);
  border-radius: 0.5rem;
  border: 1px solid var(--charcoal-gray--10);
  padding: 1.5rem;  width: 380px;
  align-items: center;
}

@media screen and (max-width: 380px) {
  ks-page-requests-list .card {
    width: 380px;
    padding: 1rem;
  }
}

ks-page-requests-list .grid {
  padding: 8.4rem 0;
  margin: 0 calc(1.5rem * -0.5);
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.125rem;
}

@media screen and (min-width: 768px) {
  ks-page-requests-list .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 992px) {
  ks-page-requests-list .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

ks-page-requests-list .grid .item {
  font-weight: 400;
  border: 2px solid transparent;
  border-radius: 1.5rem;
  box-shadow: 0 2px 10px var(--charcoal-gray--10);
  padding: 1rem;
  background: var(--white);
  color: var(--charcoal-gray);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

ks-page-requests-list .grid .item:hover {
  border: 2px solid var(--raspberry-pink);
}

ks-page-requests-list .grid .item h3 {
  line-height: 1.4;
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

ks-page-requests-list .grid .item .details {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
}

ks-page-requests-list .grid .item .details > * {
  flex: 1;
}

/**
 * Checkout create success
 */

ks-page-checkout-create-success fieldset[data-flow-continue] div {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

ks-page-checkout-create-success fieldset[data-flow-continue] .btn {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/**
 * Dialog
 */

dialog {
  display: none;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

dialog[open] {
  margin: auto;
  display: flex;
  flex-direction: column;
  width: 380px;
  gap: 12px;
  background-color: rgb(255 255 255);
  border-radius: 0.5rem;
  border: 1px solid var(--charcoal-gray--10);
  padding: 1.5rem;
}

dialog .actions {
  display: flex;
  justify-content: space-between;
}
