/* IMPORT */
@font-face {font-family: 'Geo'; src: url('assets/fonts/Geo.ttf') format('truetype'); font-display: block;}
@font-face {font-family: 'Pixelify'; src: url('assets/fonts/Pixelify.ttf') format('truetype'); font-display: block;}
@font-face {font-family: 'PressStart2P'; src: url('assets/fonts/PressStart2P.ttf') format('truetype'); font-display: block;}
/* RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* BASE */
:root {
    --spacing-base: 1rem;
}
html {
    min-height: 100%;
}
body {
    padding: var(--spacing-base) var(--spacing-base) 0;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 45rem;
    display: flex;
    flex-direction: column;
    background-color: black;
    font-family: 'PressStart2P', monospace;
    color: white;
    font-size: 1rem;
}
main {
    padding: var(--spacing-base);
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--spacing-base);
}
/* HEADER */
header {
    padding: var(--spacing-base) var(--spacing-base) calc(var(--spacing-base)*0.5);
    margin: 0 auto;
    border: 2px solid white;
    width: 80%;
    text-align: center;
}
header h1 {
    font-size: 2.5rem;
}
header h3 {
    font-family: 'Pixelify';
    font-size: 1.5rem;
}
/* TABS */
.tab-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-base);
}
.tab-container label {
    padding: var(--spacing-base) calc(var(--spacing-base) * 0.75);
    border: 2px solid white;
    height: auto;
    max-width: 30%;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    cursor: pointer;
}
.tab-container input[type="radio"] {
    display: none;
}
.tab-container input[type="radio"]:checked + label {
    background-color: white;
    color: black;
}
/* INPUT AREA */
#input-area {
    height: auto;
    min-height: 12rem;
    position: relative;
}
input:not([type="radio"]),
textarea {
    display: block;
    resize: none;
    padding: calc(var(--spacing-base) * 0.5);
    border: 2px solid white;
    width: 100%;
    background-color: black;
    text-align: center;
    font-family: 'Geo';
    color: white;
    font-size: 1rem;
}
#text-input {
    position: absolute;
    width: 100%;
    height: 100%;
}
#contact-info-inputs {
    position: relative;
    display: none;
    flex-direction: column;
    gap: calc(var(--spacing-base) * 0.5);
}
#wifi-code-inputs {
    position: relative;
    display: none;
    flex-direction: column;
    gap: calc(var(--spacing-base) * 0.5);
    min-height: 12rem;
}
/* TOGGLE */
.toggle-box {
    padding: 1rem;
    margin-top: 1rem;
    border: 2px solid green;
    color: white;
    text-align: center;
    font-size: 0.5rem;
    transition: border-color 0.3s ease;
    user-select: none;
    cursor: pointer;
}
.toggle-box[aria-pressed="true"] {
    border-color: red;
}
/* Button */
button {
    padding: var(--spacing-base);
    margin: 0 auto;
    border: none;
    width: 80%;
    background-color: white;
    font-family: 'PressStart2P', monospace;
    color: black;
    font-size: 1.1rem;
    cursor: pointer;
}
button:hover {
    background-color: #ddd;
}
/* QR Code */
#qrcode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
#qr-container {
    width: 16rem;
    height: 16rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: opacity 0.3s ease;
    background-color: white;
}
#qr-container.loading {
    opacity: 0;
}
#qr-container img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}
#qr-container.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    animation: pulse 1.5s infinite;
}
.placeholder-image {
    max-width: 100%;
    height: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}
#qr-container.loading .placeholder-image,
#qr-container:has(img:not(.placeholder-image)) .placeholder-image {
    display: none;
}
/* DOWNLOAD */
#download-button {
    width: 16rem;
    padding: 1rem;
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#download-button.visible {
    opacity: 1;
    visibility: visible;
}

#download-button:hover {
    background-color: #333;
}
/* FOOTER */
footer {
    border-top: 2px solid white;
    height: 3rem;
    max-width: 45rem;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#footer-content {
    text-align: center;
}
#footer-message {
    margin: calc(var(--spacing-base) * 0.2);
    font-size: 0.75rem;
}
footer a {
    color: white;
    text-decoration: none;
}
@media (max-width: 600px) {
    :root {
        --spacing-base: 0.6rem;
    }
    .tab-container label {
        font-size: 0.5rem;
    }
    button {
        font-size: 1rem;
    }
}