* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Skanaus-Display';
    src: url('assets/Skanaus-Display.otf') format('opentype');
}

@font-face {
    font-family: 'Diolce-Regular';
    src: url('assets/Diolce-Regular.otf') format('opentype');
}

html {
    background-color: black;
}

body {
    background-color: black;
    color: white;
    font-size: 1.8em;
    font-family: 'Diolce-Regular', sans-serif;
}

body.loginPage {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.white-mode {
    background-color: white !important;
    color: black !important;
}

body.white-mode .password-on-image {
    content: url('assets/on.png');
}

body.white-mode .corner-logo {
    filter: invert(100%);
    -webkit-filter: invert(100%);
}

/* Mobile styles for password screen */
@media screen and (max-width: 1024px) {
    .password-container {
        padding: 1em;
        max-width: 90%;
    }
    
    .password-logo {
        width: 150px;
        margin-top: 2em;
        margin-bottom: 0.4em;
    }
    
    .password-input {
        font-size: 1.5em;
        padding: .5em;
    }

    .password-button {
        font-size: 1em;
        padding: .2em;
    }
    
    
}

h1 {
    font-family: 'Skanaus-Display', sans-serif;
    /* margin-top: 1em; */
    /* margin-left: .2em; */
}

img {
    width: 300px;
}



input[type="text"] {
    width: 400px;
    font-size: .8em;
    background: transparent;
    border: none;
    border-bottom: 1px dotted white;
    outline: none;
    color: hsl(0, 0%, 100%);
    font-family: 'Courier', monospace;
    margin-left: .8em;
    box-sizing: border-box;
}

input[type="text"]::placeholder {
    font-family: 'Courier', monospace;
    font-size: .8em;
}

input[type="checkbox"]::before {
    content: '';
    display: block;

    width: 40px;
    height: 100%;
    position: absolute;
    left: 35px;

    transition: background 0.2s ease, filter 0.2s ease;
    background: url(assets/offlight2.png) no-repeat center center/contain;
    will-change: filter;
}

input[type="checkbox"]:checked::before {
    filter: drop-shadow(0 0 0.5rem #012798) drop-shadow(0 0 1rem #012798) drop-shadow(0 0 2rem #012798) drop-shadow(0 0 3rem #012798);
    background-image: url(assets/onlight2.png);
}

input[type="checkbox"] {
    position: relative;
    margin: 0.5em;
    width: 170px;
    height: 70px;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: url('assets/off.png') no-repeat center center/contain;
    background-position: 100% center;
    vertical-align: middle;
    margin-right: 15px;

    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-image: url('assets/on.png');
}

br {
    line-height: 1;
}

/* Mobile styles for bigger elements */
@media screen and (max-width: 1024px) {
    body {
        font-size: 1.5em;
        line-height: 1;
    }

    h1 {
        font-size: 1.7em;
        margin-top: .2em;
    }
    
    input[type="text"] {
        width: 42%;
        font-size: .7em;
        padding: 4px;
        background: transparent;
        border: none;
        border-bottom: 1px dotted white;
        outline: none;
        color: white;
        font-family: 'Courier', monospace;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    #nameInput {
        width: 200px !important;
        margin-bottom: .2em !important;
    }
    
    input[type="text"]::placeholder {
        font-size: .8em;
    }
    
    input[type="checkbox"] {
        height: 50px;
        width: 120px;
    }

    input[type="checkbox"]::before {
        left: 15px;
    }
}

/* Password Protection Styles */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

body.white-mode .password-screen {
    background-color: white;
}

/* Corner logos */
.corner-logo {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 1001;
}

.corner-logo.top-left {
    top: 20px;
    left: 20px;
}

.corner-logo.top-right {
    top: 20px;
    right: 20px;
}

.corner-logo.bottom-left {
    bottom: 20px;
    left: 20px;
}

.corner-logo.bottom-right {
    bottom: 20px;
    right: 20px;
}

.password-container {
    text-align: center;
    max-width: 600px;
    padding: 2em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.password-logo {
    width: 200px;
    margin-bottom: 1em;
    margin-top: 0em;
}

.password-form {
    margin: 2em 0;
    margin-bottom: 0em;
    margin-top: 0em;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.door-image {
    width: 400px;
    margin-bottom: .5em;
    margin-top: 1em;
    /* filter: grayscale(100%) contrast(160%) brightness(0.8);
    -webkit-filter: grayscale(100%) contrast(160%) brightness(0.8); */
}

.password-on-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.password-on-image {
    width: 65px;
    margin-top: 0em;
    margin-bottom: 1em;
    /* Black and white filter with increased contrast */
    filter: grayscale(50%) contrast(120%);
    -webkit-filter: grayscale(50%) contrast(120%);
}

.password-input {
    width: 100%;
    max-width: 300px;
    padding: .3em !important;
    font-size: 1em !important;
    background: transparent;
    border: 1px dotted white;
    border-radius: 5px;
    color: white;
    font-family: 'Diolce-Regular', sans-serif;
    margin-bottom: .5em;
    text-align: center;
    outline: none;
}

body.white-mode .password-input {
    border: 1px dotted black;
    color: black;
}

.password-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

body.white-mode .password-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Ensure name input uses same font as password input */
#nameInput {
    font-family: 'Diolce-Regular', sans-serif !important;
    border-radius: 0 !important;
}

#nameInput::placeholder {
    font-family: 'Diolce-Regular', sans-serif !important;
}

.password-button {
    width: 100%;
    max-width: 100px;
    padding: .1em !important;
    font-size: .7em !important;
    background: #c0c0c0;
    color: black;
    margin-top: .5em;
    border: 2px outset #c0c0c0;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    box-shadow: inset 1px 1px 0px #ffffff, inset -1px -1px 0px #808080;
}

.password-button:hover {
    background: #d0d0d0;
}

.password-button:active {
    border: 2px inset #c0c0c0;
    box-shadow: inset 1px 1px 0px #808080, inset -1px -1px 0px #ffffff;
}

.password-error {
    color: #ff6b6b;
    margin-top: .5em;
    font-size: .8em;
    min-height: 1.5em;
}

.main-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#switches {
    list-style: none;
    display: flex;
    flex-direction: column;
    width: 50%;
    margin: 0 auto;
    margin-top: 3em;
    padding-left: 0px;
}

#switches > li {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.1em;
}

#switches label {
    cursor: pointer;
}

#switches textarea, #switches .note {
  font: 0.6em 'Courier', monospace;
  text-align: left;
  line-height: 1.2em;

  margin-left: 1em;
}

#switches .note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

#switches textarea {
  background: none;
  border: none;
  border-bottom: 1px dotted white;
  outline: none;
  flex: 1;
  color: white;
  resize: none;
  padding-top: 0.1em;
  padding-bottom: 0.1em;
  transition: height 0.2s ease;

  min-height: 1.5em;
  max-height: 2.5em;
}

#switches textarea::placeholder {
    font-family: 'Courier', monospace;
    font-size: .8em;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile styles for password screen */
@media screen and (max-width: 1024px) {
    .password-container {
        padding: 1em;
        max-width: 90%;
    }

    .password-container h1 {
        margin-top: 1em;
    }

    .door-image {
        width: 260px;
        margin-bottom: .5em;
        margin-top: 1em;
        /* filter: grayscale(100%) contrast(160%) brightness(0.8);
        -webkit-filter: grayscale(100%) contrast(160%) brightness(0.8); */
    }
    
    .password-logo {
        width: 150px;
        margin-top: 2em;
        margin-bottom: 0.4em;
    }
    
    .password-input {
        font-size: 1.5em;
        padding: .5em;
        width: 48%;
    }

    .password-button {
        font-size: 1em;
        padding: .2em;
        max-width: 70px;
        margin-top: .2em !important;
    }
    
    body.white-mode .corner-logo {
        filter: invert(100%);
        -webkit-filter: invert(100%);
    }

    #switches {
        margin: 0;
        width: calc(100% - 0.5em);
    }
}

/* Info Area Styles */
.info-area {
    margin-top: 4em;
    margin-bottom: 2em;
    max-width: 900px;
    width: 100%;
    padding: 2em;
    border-top: 1px dotted rgb(255, 255, 255);
    margin-left: auto;
    margin-right: auto;
}

.info-area h3 {
    font-family: 'Skanaus-Display', sans-serif;
    margin-bottom: 1em;
    margin-top: 1em;
    color: #c0c0c0;
    font-size: 1.2em;
}

.info-content p {
    margin-bottom: 1em;
    line-height: 1.4;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.info-content p:last-child {
    margin-bottom: 0;
}

/* White mode styles for info area */
body.white-mode .info-area {
    border: 1px dotted rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.05);
}

body.white-mode .info-area h3 {
    color: #404040;
}

body.white-mode .info-content p {
    color: rgba(0, 0, 0, 0.8);
}

#house {
  width: 20rem;
  height: 20rem;
}

/* Mobile styles for info area */
@media screen and (max-width: 1024px) {
    .info-area {
        margin-top: 2em;
        margin-bottom: 1em;
        padding: 1.5em;
    }
    
    .info-area h3 {
        font-size: 1.1em;
    }
    
    .info-content p {
        font-size: 0.85em;
    }

  #house {
    width: 10rem;
    height: 10rem;
  }
}

#kiosk {
    overflow: hidden;
    height: 100vh;
}

#kiosk #house {
  width: 10rem;
  height: 10rem;
}

#kiosk > header {
    display: flex;
    align-items: center;
    font-size: 0.8em;
    border-bottom: 1px solid #aaa;
    margin-bottom: 1em;
    width: 100%;
    padding-right: 1em;
}

#kiosk > header > .qr-container > img { 
  width: 110px;
  
}

.qr-container {
    margin-left: auto;
    text-align: center;
}

#kiosk #switches {
  flex-wrap: wrap;
  width: 100%;
  flex-direction: row;
  margin: 0;
}

#kiosk #switches li {
  flex-direction: column;
  width: calc(100% / 4);
  align-items: flex-start;
}

#kiosk input[type="checkbox"] {
}

#kiosk #switches textarea::placeholder {
  color: transparent;
}


#kiosk #switches textarea {
  border: none;
  width: 100%;
}

#kiosk #switches > li:not(.empty) {
  order: -1;
}


