/* =========================================
   1. IMPORTS & SETUP
   ========================================= */
@import url("https://site-assets.fontawesome.com/releases/v6.7.2/css/all.css");

/* =========================================
   2. VARIABLES & THEME
   ========================================= */
:root {
    /* --- Standard Colors --- */
    --gray: #86888a;
    --orange: #f5793a;
    --blue: #85c0f9;

    /* --- App Specific Colors --- */
    --purple: #21123b;
    --light-pink: #ffe6ea;
    --pink: #e06377;
    --brown: #a95c35;
    --green: #79b851;
    --yellow: #f3c237;

    /* --- BlockStatus colors --- */
    --light-yellow: #f3c23766;
    --very-light-yellow: #f3c23744;
    --dark-green: #18b461;
    --red: #f92954;
    --ios-blue: #007AFF;

    /* --- Layout & Spacing --- */
    --ad-space: 60px;
    --header-height: 50px;
    /* --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom); */
    --safe-top: 0px;
    --safe-bottom: 0px;
    --top-space: var(--safe-top);
    --bottom-space: var(--safe-bottom);

    /* --- Game Settings --- */
    --keyboard-height: calc(200px + var(--safe-bottom));
    --game-max-width: 500px;
    --letters: 7;
    --rows: 8;
    --duration: 0.5s;
    /* Animation Duration */

    /* --- Typography --- */
    font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
}

/* --- Light Theme (Default) --- */
:root,
.light {
    --color-tone-1: #1a1a1b;
    --color-tone-2: #787c7e;
    --color-tone-3: #878a8c;
    --color-tone-4: #d3d6da;
    --color-tone-5: #edeff1;
    --color-tone-6: #f6f7f8;
    --color-tone-7: #ffffff;
    --opacity-50: #f3f2f8;
    --transparent: #f3f2f8aa;

    --blob: var(--color-tone-7);
    --blobButton: var(--color-tone-5);

    --color-absent: #a4aec4;
    /* Game specific absent color */
}

/* --- Dark Theme --- */
.dark {
    --color-tone-1: #d7dadc;
    --color-tone-2: #818384;
    --color-tone-3: #565758;
    --color-tone-4: #3a3a3c;
    --color-tone-5: #272729;
    --color-tone-6: #1a1a1b;
    --color-tone-7: #121213;
    --opacity-50: #000000;
    --transparent: #000000aa;

    --blob: var(--color-tone-5);
    --blobButton: var(--color-tone-3);

    --color-absent: #3d4054;
    /* Game specific absent color */
}

/* --- High Contrast Theme --- */
.contrast {
    --green: var(--orange);
    --yellow: var(--blue);
}

/* --- April Fools Theme --- */
.aprilFools,
.aprilFools .light,
.aprilFools .dark {
    --yellow: var(--pink);
    --color-absent: var(--brown) !important;
    background: pink;
    --opacity-50: pink;
}

.aprilFools table.squares td {
    background: var(--light-pink);
    border-color: transparent;
}

/* Theme Toggle Labels */
.contrastEnabled::after,
.aprilFoolsEnabled::after {
    content: "Disabled";
}

.contrast .contrastEnabled::after,
.aprilFools .aprilFoolsEnabled::after {
    content: "Enabled";
}

/* =========================================
   3. GLOBAL RESETS & BASE STYLES
   ========================================= */

* {
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    -webkit-user-select: auto;
    user-select: auto;
    transition: background 0.1s, color 0.1s, border 0.1s;
    /* Override transition for performance or specific style preference */
    transition: background 0s !important;
}

*:not(input) {
    user-select: none;
    -webkit-user-select: none;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--color-tone-7);
    /* Using tone-7 as per standard.css update */
    color: var(--color-tone-1);
    overflow: hidden;
    height: 100%;
    width: 100%;
    position: fixed;
    height: -webkit-fill-available;
    -webkit-text-size-adjust: 100%;
    padding-top: var(--top-space);
    transition: padding-top 0.3s, background 0.3s, color 0.3s;
}

/* Links */

a {
    cursor: pointer;
    text-decoration: underline;
    color: inherit;
}

/* =========================================
   4. LAYOUT COMPONENTS
   ========================================= */

/* --- Main Container --- */
main {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

main.hide {
    visibility: hidden;
}

/* --- Header --- */
header {
    text-align: center;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--purple);
    color: whitesmoke;
    z-index: 3;
    overflow: hidden;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

header button,
header h1 {
    font-size: 30px;
    padding: 6.5px;
    margin: 0;
}

/* Header Icons */
div.icon {
    position: absolute;
    top: 5px;
}

div.icon button {
    color: #aaa;
    cursor: pointer;
    padding: 10px 7.5px;
    padding-bottom: 15px;
    border-radius: 10px 10px 0 0;
    font-size: 20px;
    background: transparent;
    border: none;
}

div.icon:first-child {
    left: 15px;
}

div.icon:last-child {
    right: 15px;
}

div.icon button.active {
    background: var(--opacity-50);
    color: var(--color-tone-1);
    border: 0.5px solid var(--color-tone-4);
    border-bottom: none;
}

@media (max-width: 380px) {
    #dayNumber {
        display: none;
    }
}

/* --- Navigation / iOS Header --- */
nav {
    background: var(--purple);
    width: 100%;
    height: var(--safe-top);
    position: fixed;
    z-index: 4;
    top: 0;
    left: 0;
}

/* --- Aside / Modal Panels --- */
aside {
    position: fixed;
    z-index: 2;
    left: calc(50% - 250px);
    width: 100%;
    max-width: 500px;
    background: var(--opacity-50);
    color: var(--color-tone-1);
    /* opacity: 0; */
    /* visibility: hidden; */
    transition: background 0.3s, color 0.3s;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: hidden !important;
    /* Scroll handled by wrapper */
    border-radius: 0 0 10px 10px;
    border: 0.5px solid var(--color-tone-4);
    border-top: none;
    top: calc(var(--header-height) + var(--top-space) + 10px);
    bottom: calc(var(--bottom-space) + 10px);
    transition: top 0.3s, bottom 0.3s;
    display: none;
}

aside.show {
    display: block;
    /* opacity: 1; */
    /* visibility: visible; */
}

/* Wrapper for aside scrolling/fade effect */
.aside-scroll-wrapper {
    overflow-y: auto;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    scrollbar-width: thin;
    display: inherit;
    flex-direction: inherit;
}

aside::before,
aside::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

aside::before {
    top: 0;
    background: linear-gradient(to bottom, var(--opacity-50) 0%, transparent 100%);
}

aside::after {
    bottom: 0px;
    background: linear-gradient(to top, var(--opacity-50) 0%, transparent 100%);
}

aside.can-scroll-top::before {
    opacity: 1;
}

aside.can-scroll-bottom::after {
    opacity: 1;
}

@media (max-width: 500px) {
    aside {
        left: 0;
        border-radius: 0;
        margin: 0;
        border: none;
        top: calc(var(--header-height) + var(--top-space));
        bottom: var(--bottom-space);
    }
}

/* Aside Typography */
aside h1,
section h1,
.bundle h1 {
    margin: 0;
    margin-bottom: 20px;
    font-size: 26px;
}

aside p,
section p,
.bundle p {
    margin: 10px 0;
    font-size: 16px;
}

aside h2,
section h2,
.bundle h2 {
    margin: 10px 0;
    font-size: 20px;
}

.bundle h2 {
    margin-top: 0;
}

span.spacing {
    display: block;
    height: 10px;
}

/* --- Game Board Section --- */
aside#gameBoard {
    padding: 0;
    display: flex;
    flex-direction: column;
}

section.board {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
}

/* =========================================
   5. UI COMPONENTS & BUTTONS
   ========================================= */

/* Common Button Styles */
aside button,
section button,
button.forward,
div.bundle button {
    padding: 10px;
    width: 100%;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    color: var(--color-tone-1);
    cursor: pointer;
    background: var(--blob);
}

button[disabled] {
    cursor: not-allowed;
    background: lightgray !important;
}

/* Bundle / Grouped Content */
div.bundle {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    background: var(--blob);
}

div.bundle button,
div.bundle button.light {
    background: var(--blobButton);
}

.bundle button {
    border-radius: 5px !important;
}

/* Visual Buttons (Horizontal Scroll) */
aside span.visualButtons {
    overflow-x: scroll;
    touch-action: pan-x;
}

aside span.visualButtons button {
    padding: 8px;
    cursor: auto;
    touch-action: pan-x;
}

/* Gradient Buttons */
aside span.gradientButtons button {
    background: linear-gradient(var(--color-tone-4) 95%, var(--green) 100%);
}

/* Half Buttons */
span.halfButtons {
    display: flex;
    max-width: 100%;
    border-radius: 10px;
}

span.halfButtons button {
    width: 100%;
    display: inline-block;
    margin: 0 3px;
}

aside span.halfButtons button:first-child {
    margin-left: 0;
}

aside span.halfButtons button:last-child {
    margin-right: 0;
}

/* Three Buttons Layout */
span.threeButtons {
    display: flex;
    max-width: 100%;
    justify-content: space-between;
}

span.threeButtons button {
    width: 32%;
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    margin: 0 3px;
    min-width: 0;
    padding: 8px 2px;
    border-radius: 10px !important;
}

span.threeButtons button:first-child {
    margin-left: 0;
}

span.threeButtons button:last-child {
    margin-right: 0;
}

/* iOS Style Action Button */
button.ios {
    width: calc(100% - 30px);
    border: none;
    color: white;
    padding: 8px;
    font-size: 20px;
    background-color: var(--ios-blue);
    border-radius: 10px;
    cursor: pointer;
    margin: 5px auto;
}

button.ios.yellow {
    background: var(--yellow);
    color: black;
}

button.ios.bottom {
    position: absolute;
    margin: 0;
    bottom: calc(15px + env(safe-area-inset-bottom) / 2);
    left: 15px;
    width: calc(100% - 30px);
}

/* Forward Button */
button.forward {
    text-align: left;
    padding: 10px;
    margin-top: 6px;
}

button.forward::after {
    content: "\f105";
    font-family: "Font Awesome 5 Pro";
    float: right;
}

/* Special Button Styles & Icons */
aside button strong {
    display: block;
    font-size: 26px;
    margin-bottom: 5px;
}

aside button:before {
    font-weight: bold;
    font-family: arial, "Font Awesome 6 Pro", "Font Awesome 6 Brands";
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Button Icon Mappings */
aside button.play:before {
    content: "\f144  Play Now";
}

aside button.board:before {
    content: "\e195  View Board";
}

aside button.image:before {
    content: "\f0ab  Save Image";
}

aside button.info:before {
    content: "\f05a  Info";
}

aside button.openStats:before {
    content: "\e473  See Stats and Share";
}

aside button.share:before {
    content: "\e09a";
}

aside button.copy:before {
    content: "\f0c5";
}

aside button.email:before {
    content: "\f0e0";
}

aside button.telegram:before {
    content: "\f2c6";
}

aside button.twitter:before {
    content: "\f099";
}

aside button.bluesky:before {
    content: "\e671";
}

aside button.facebook:before {
    content: "\f39e";
}

/* Button Colors */
aside button.openStats,
aside button.info,
aside button.share {
    color: white;
}

aside button.telegram,
aside button.twitter,
aside button.bluesky,
aside button.facebook,
aside button.email {
    color: white;
    font-size: 20px;
}

aside button.share,
aside button.openStats {
    background: var(--green);
}

aside button.openStats {
    width: 100% !important;
    border-radius: 10px;
}

aside button.info {
    background: var(--yellow);
}

aside button.twitter {
    background: rgb(29, 155, 240);
}

aside button.bluesky {
    background: rgb(5, 96, 255);
}

aside button.telegram {
    background: #179cde;
    font-size: 24px;
}

aside button.email {
    background: var(--gray);
}

aside button.facebook {
    background: #39569c;
}

aside button.copy {
    background: var(--color-tone-4);
}

/* Main Menu Status colors */
aside div h2 span.status:after {
    content: "not started";
    color: var(--orange);
}

aside div.started h2 span.status:after {
    content: "in-progress";
    color: var(--yellow);
}

aside div.complete h2 span.status:after {
    content: "Complete!";
    color: var(--green);
}

aside div.fail h2 span.status:after {
    content: "unsuccessful";
    color: red;
}

/* Home Screen Button Visibility */
aside#home div span.completeButtons,
aside#home div.complete button.play,
aside#home div.fail button.play {
    display: none;
}

aside#home div.complete span.completeButtons,
aside#home div.fail span.completeButtons {
    display: flex;
}

/* --- Device/Theme Toggle Buttons --- */
button.device {
    background: linear-gradient(135deg, #edeff1 50%, #272729 50%) !important;
}

button.dark {
    background: var(--color-tone-7);
}

button.device span.label {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1b;
    padding: 2px 8px;
    border-radius: 12px;
}

.threeButtons .light,
.threeButtons .dark,
.threeButtons .device {
    border: 4px solid #999;
}

.threeButtons .selected {
    border-color: var(--yellow) !important;
}

.threeButtons table.squares tbody {
    padding: 10px 0;
}

.threeButtons button table.squares td {
    font-size: 14px;
}


/* =========================================
   6. GAME BOARD & GRID
   ========================================= */

table.squares tbody {
    display: grid;
    grid-template-rows: repeat(var(--rows), 1fr);
    grid-gap: 5px;
    padding: 10px;
}

table.squares tr {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(var(--letters), 1fr);
}

table.squares td {
    text-align: center;
    height: 1.5em;
    /* relative sizing */
    width: 1.5em;
    font-size: 36px;
    /* base font size */
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-tone-7);
    border: 2px solid var(--color-tone-4);
    color: var(--color-tone-1);
}

/* Interactive States */
tr.current td {
    cursor: pointer;
}

tr.current td.current {
    border-color: var(--yellow) !important;
}

/* Filled/Animations */
td[data-state="tbd"] {
    border: 2px solid var(--color-tone-3);
    animation: pop .3s;
}

td.filled,
button.filled {
    --half: calc(var(--duration) / 12);
    animation-name: fill;
    animation-duration: var(--duration);
    animation-fill-mode: forwards;
}

.filled[data-state="absent"] {
    animation-name: fill, absent;
}

.filled[data-state="present"] {
    animation-name: fill, present;
}

.filled[data-state="correct"] {
    animation-name: fill, correct;
}

/* Staggered Animation Delays */
td.filled:nth-child(2) {
    animation-delay: calc(1 * var(--half));
}

td.filled:nth-child(3) {
    animation-delay: calc(2 * var(--half));
}

td.filled:nth-child(4) {
    animation-delay: calc(3 * var(--half));
}

td.filled:nth-child(5) {
    animation-delay: calc(4 * var(--half));
}

td.filled:nth-child(6) {
    animation-delay: calc(5 * var(--half));
}

td.filled:nth-child(7) {
    animation-delay: calc(6 * var(--half));
}

td.filled:nth-child(8) {
    animation-delay: calc(7 * var(--half));
}

/* Row Shake (Invalid) */
tr.current.invalid {
    animation: Shake 600ms;
}

/* Animations Keyframes */
@keyframes absent {
    100% {
        background: var(--color-absent);
    }
}

@keyframes present {
    100% {
        background: var(--yellow);
    }
}

@keyframes correct {
    100% {
        background: var(--green);
    }
}

@keyframes fill {
    0% {
        border: none;
        transform: rotateX(0);
    }

    50% {
        transform: scale(1.2);
        transform: rotateX(-90deg);
    }

    100% {
        color: white;
        border: none;
        transform: rotateX(0);
    }
}

@keyframes Shake {

    10%,
    90% {
        transform: translateX(-1px);
    }

    20%,
    80% {
        transform: translateX(2px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

@keyframes pop {
    from {
        transform: scale(.8);
        opacity: 0
    }

    40% {
        transform: scale(1.1);
        opacity: 1
    }
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 0.5s;
}


/* Captions & Screenshots */
table.squares.photo td {
    color: transparent !important;
}

table.squares.photo {
    transform: scale(1) !important;
    background: var(--opacity-50);
    --duration: 0s !important;
}

table.squares caption {
    display: none;
    font-size: 20px;
    color: var(--color-tone-1);
}

table.squares caption strong {
    font-size: 30px;
}

table.squares.photo caption.title,
table.squares.fail caption.answer {
    display: table-caption;
    visibility: visible !important;
}

@media (max-height: 700px) {
    table.squares.fail {
        transform: scale(0.9) !important;
    }
}

/* Button Board Preview override */
button table.squares td {
    font-size: 18px;
}

/* Responsive Text Size for gameboard */

@media (max-height: 890px) or (max-width: 450px) {
    table.squares td {
        font-size: 30px;
    }
}

@media (max-height: 765px) {
    table.squares td {
        font-size: 28px;
    }
}

@media (max-height: 740px) {
    table.squares td {
        font-size: 26px;
    }
}

@media (max-height: 715px) {
    table.squares td {
        font-size: 24px;
    }
}

@media (max-height: 690px) {
    table.squares td {
        font-size: 22px;
    }
}

@media (max-height: 665px) {
    table.squares td {
        font-size: 20px;
    }
}

@media (max-height: 640px) {
    table.squares td {
        font-size: 19px;
    }
}

@media (max-height: 615px) {
    table.squares td {
        font-size: 18px;
    }

    body {
        --header-height: 40px;
    }

    header div.icon {
        top: 5px;
    }

    header div.icon button {
        padding: 5px 7.5px;
        padding-bottom: 10px;
    }
}

@media (max-height: 590px) {
    table.squares td {
        font-size: 16px;
    }
}

@media (max-height: 540px) {
    table.squares td {
        font-size: 14px;
    }
}

/* =========================================
   7. KEYBOARD
   ========================================= */

section.keyboard {
    height: var(--keyboard-height);
    width: 100%;
    background: var(--color-tone-7);
    border-radius: 10px 10px 0 0;
    padding: 5px 15px;
    user-select: none;
    overflow: hidden;
    position: relative;
}

.dark section.keyboard {
    background: var(--color-tone-3);
}

section.keyboard .row {
    display: flex;
    gap: 5px;
    margin: 10px auto;
    justify-content: center;
}

section.keyboard .row .key {
    font-size: 20px;
    background: var(--color-tone-4);
    border-radius: 5px;
    height: 50px;
    min-width: 25px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    color: var(--color-tone-1);
    padding: 0;
}

.dark section.keyboard .row .key {
    background: var(--color-tone-2);
}

.dim {
    opacity: 0.5;
}

section.keyboard .row .half {
    flex: 0.5;
}

@supports (-webkit-touch-callout: none) {

    /* iOS specific gap adjustment */
    section.keyboard .row {
        gap: 2px !important;
    }
}

/* Dictionary Overlay in Keyboard area */
.keyboard .dictionary {
    height: 100%;
    width: 100%;
    background: var(--transparent);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: absolute;
    left: 0;
    top: var(--keyboard-height);
    /* initially hidden below */
    transition: top .3s;
    padding: 20px;
    overflow-y: auto;
}

.keyboard .dictionary.show {
    top: 0;
}

.dictionary button {
    background: var(--blobButton);
    color: var(--color-tone-1);
}


/* =========================================
   8. NOTIFICATIONS & LOADING
   ========================================= */

/* Alert Box */
div#alertBox {
    position: fixed;
    top: calc(var(--header-height) + var(--top-space));
    transition: top 0.3s;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--purple);
    z-index: 3;
    border-radius: 0 0 10px 10px;
}

div#alertBox span {
    display: block;
    overflow: hidden;
    width: calc(100% - 20px);
    max-width: 480px;
    background: var(--opacity-50);
    color: var(--color-tone-1);
    margin: 10px auto;
    padding: 10px;
    font-size: 15px;
    border-radius: 5px;
    text-align: center;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    height: auto;
    cursor: pointer;
}

/* Loading Screen */
.loading body {
    overflow: hidden !important;
}

div.loadScreen,
div.landscape {
    position: fixed;
    z-index: 3;
    bottom: 100%;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: var(--purple);
    color: white;
    text-align: center;
    transition: bottom 0.5s 0.5s;
    border-radius: 15px 15px 0 0;
    font-family: arial;
    overflow: hidden;
}

.loading div.loadScreen {
    bottom: 0;
    border-radius: 0;
}

div.loadScreen.instant {
    transition: bottom 0.5s 0s;
}

div.loadScreen img,
div.landscape i {
    width: 150px;
    font-size: 150px;
    margin-top: 150px;
    border-radius: 5px;
    box-shadow: 0 0 50px #99999999;
    animation: spinner 4s linear infinite;
    border-radius: 20%;
}

div.landscape {
    transition: bottom 0.5s !important;
    z-index: 4;
}

div.landscape i {
    margin-top: 50px;
    box-shadow: none;
}

div.loadScreen h1,
div.landscape h1 {
    margin-top: 30px;
    font-size: 24pt;
}

@media screen and (orientation:landscape) and (max-height: 500px) and (min-width: 500px) {
    div.landscape {
        bottom: 0 !important;
        border-radius: 0 !important;
    }
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(180deg) scale(1.05);
    }

    12% {
        transform: rotate(180deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1);
    }

    60% {
        transform: rotate(360deg) scale(1.05);
    }

    62% {
        transform: rotate(360deg) scale(1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}


/* =========================================
   9. POPUPS & WIDGETS
   ========================================= */

/* Bottom Popup */
.bottomPopup {
    background: var(--color-tone-6);
    position: fixed;
    bottom: 0;
    top: 100%;
    width: 100%;
    border-radius: 30px 30px 0 0;
    transition: top 0.4s;
    overflow: hidden;
    z-index: 3;
    color: var(--color-tone-1);
    display: block;
    box-shadow: 0px 0 10px rgba(0, 0, 0, 0.8);
}

.bottomPopup.show {
    top: calc(60px + var(--top-space));
}

.bottomPopup i.fa-dash {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 30px;
    color: #888;
    cursor: pointer;
}

.bottomPopup h1 {
    margin: 20px;
    text-align: center;
}

.bottomPopup .thin {
    padding: 0 20px;
}

.bottomPopup p {
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
}

.bottomPopup p strong {
    font-size: 20px;
}

/* Input Fields */
.bottomPopup input[type=text],
.niceInput {
    border: 2px solid transparent;
    width: 100%;
    font-size: 20px;
    color: var(--color-tone-1);
    background: var(--color-tone-5);
    padding: 15px;
    border-radius: 10px;
    outline: 0;
}

.bottomPopup input[type=text]:focus {
    border-color: var(--yellow);
}

/* Error handling in popups */
.bottomPopup .errorText {
    display: none;
    color: var(--red);
    margin-top: 5px;
    font-size: 14px;
}

.bottomPopup.error .errorText {
    display: block;
}

.bottomPopup.error input[type=text] {
    border-color: var(--red);
}

#shareButtons {
    margin-bottom: 6px;
}

/* =========================================
   10. MEDIA QUERIES (ADDITIONAL)
   ========================================= */

@media (min-height: 800px) and (min-width: 470px) {
    body {
        --header-height: 70px;
    }

    header div.icon {
        top: 15px;
    }

    header div.icon button {
        padding-bottom: 25px;
    }
}

@media (min-height: 800px) and (min-width: 470px) {
    header h1 {
        font-size: 35px;
        padding: 10px;
    }

    header div.icon button {
        padding: 10px;
        padding-bottom: 25px;
    }

    aside p {
        font-size: 18px !important;
    }
}

@media (min-width: 501px) {
    body {
        padding-top: calc(10px + var(--top-space));
    }

    div#alertBox {
        top: calc(10px + var(--top-space) + var(--header-height));
    }

    header {
        border-radius: 10px 10px 0 0;
        border: 0.5px solid var(--color-tone-4);
        border-bottom: none;
    }
}

/* Ad adjustments */
body.hasHeaderAd {
    --top-space: calc(var(--ad-space) + var(--safe-top));
}

body.hasFooterAd {
    --bottom-space: calc(var(--ad-space) + var(--safe-bottom));
}

.adthrive-footer,
.adthrive-header {
    transition: height 0.3s !important;
    height: var(--ad-space) !important;
    display: flex !important;
}

/* Adthrive integration */
/* .adthrive-sticky-outstream-mobile-left, .adthrive-sticky-outstream-mobile-right {
    display: none !important;
} */

.adthrive-footer-message {
    margin-bottom: 0 !important;
}

@media (max-width: 850px) {
    .adthrive-sticky-outstream {
        display: none !important;
    }
}