@import "/lib/fomantic-ui-2.9.2/semantic.min.css" layer(semantic);

@layer pairgoth {
  
  /* general styles */
  body {
    font-size: clamp(14px, 1rem + 1vw, 24px);
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .flex {
    display: flex;
    &.horz {
      flex-flow: row nowrap;
      align-items: center;
    }
    &.vert {
      flex-flow: column nowrap;
      align-items: stretch;
    }
  }

  /* header, center, footer */
  
  #header {
    height: 3em;
    width: 100%;
    position: relative;
    align-items: flex-start;
    justify-content: space-between;
    #logo {
      height: 100%;
      img {
        display: inline-block;
        max-height: 100%;
      }
    }
  }

  #center {
    flex: 1;
    overflow: auto;
    #inner {
      max-width: clamp(800px, 80vw, 100vw);
      display: flex;
      flex-flow: column nowrap;
      align-items: center;
      margin-left: auto;
      margin-right: auto;
    }
  }

  #footer {
    flex: 0;
    height: 2em;
    margin: 0 0.5em;
    font-size: 0.8em;
    justify-content: space-between;
  }

  .section {
    padding: 0.5em;
  }

  /* modal and dimmer */

  #dimmer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: black;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1000;
    pointer-events: none;
  }

  body.dimmed #dimmer {
    display: block;
    opacity: 0.85;
    pointer-events: all;
  }
  .ui.modal {
    display: block;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
  }

  .ui.modal .header {
    font-size: 1em;
    align-items: baseline;
    justify-content: space-around;
    flex-wrap: wrap;
  }

  .active.ui.modal {
    font-size: 1em;
    opacity: 1;
    pointer-events: all;
  }

  /* buttons */
  
  .button {
    font-size: 1em;
  }

  .button.floating {
    box-shadow: 0px 8px 8px -5px rgba(0,0,0,35%);
    transition: all 0.3s;
    &.white  {
      border: solid 1px black;
      background-color: white;
    }
    &:hover {
      box-shadow: 0px 10px 10px -5px rgba(0,0,0,35%);
      transform: scale(1.05);
    }
    &:active {
      transition: all 0.1s;
      box-shadow: none;
      transform: translate(0px, 5px);
    }
  }

  /* languages */

  #lang {
    position: relative;
    cursor: pointer;
    transform: scale(1.2);
    #lang-list {
      position: absolute;
      display: none;
      top:100%;
      right: 1em;
      flex-flow: column nowrap;
      padding: 0.5em;
      gap: 0.5em;
      background-color: #dddddd;
      align-items: flex-start;
      z-index: 50;
      &.shown {
        display: flex;
      }
      a {
        display: inline-block;
        white-space: nowrap;
        text-align: center;
        i {
          vertical-align: middle;
        }
      }
    }
  }

  /* UI fixes */

  .ui.form, .ui.segment, .ui.form .field > label { font-size: 1em; }
  span > input[type="radio"] { vertical-align: text-top; }
  span > input[type="text"] { vertical-align: baseline; width: initial; }
  span > input.date { vertical-align: baseline; width: 8em; }

  .step, .step .title { font-size: 1em; }
  .step:before { font-size: 1em; }
  .step.description { font-size: 0.8em; }
  .step:first-child { padding-left: 1em; }
  .step:last-child { padding-right: 1em; }
  .step .description { display: none; }

  input[type="number"] {
    padding: 0.2em 0.1em 0.2em 1em;
    vertical-align: baseline;
    width: 3.5em;
  }

}
