/* START BASIC ELEMENTS */
/* Body CSS, mainly for the background but the font is here too, see bottom for font imports */
body {
    background-image: url("/assets/bg.webp");
    background-color: #ffabbd;
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Ubuntu', Calibri, sans-serif;
}

/* Make it so images can't overflow */
img {
    max-width: 100%;
}

/* Bigger h1 text */
h1 {
    font-size: 250%;
}

/* Bigger h2 text */
h2 {
    font-size: 180%;
}

/* Default to indenting paragraphs */
p {
    text-indent: 24px;
}

/* Style hr elements, chromium compatible! */
hr {
    color: #965c69;
    height: 2px;
    border: none;
    background: #965c69;
}

/* fieldset and legend styling for better generator UIs */
fieldset {
    margin: 16px;
    border: 3px solid #eee;
    border-radius: 6px;
    background-color: #f1cdd3;
}
legend {
    border: 3px solid #eee;
    border-radius: 6px;
    padding-left: 6px;
    padding-right: 6px;
    background-color: #c0d5db;
}

/* Additional styling that is only supported in Firefox */
@-moz-document url-prefix() {
    legend {
        width: 10%;
        text-align: center;
    }
}

/* Buttons, excludes .subnavbtn because submenu shenanigans, 
I think this was problems with the old navbar, but it doesn't hurt to exclude still */
button:not(.subnavbtn) {
    border: 2px solid #b48b92;
    border-radius: 4px;
    padding: 4px 8px;
    background-image: linear-gradient(to left, #f8c9d2, #f7bac5);
    background-color: #f8c9d2;
    font-size: 14px;
    text-align: center;
}
button:not(.subnavbtn):hover {
    border: 2px solid #b48b92;
    border-radius: 4px;
    background-image: linear-gradient(to left, #fcd8de, #fdc4cf);
    background-color: #fcd8de;
}
button:not(.subnavbtn):active {
    border: 2px solid #b48b92;
    border-radius: 4px;
    background-image: linear-gradient(to left, #e6c3ca, #ddabb5);
    background-color: #e6c3ca;
}
button:not(.subnavbtn):disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    background-image: linear-gradient(to left, #e6c3ca, #ddabb5);
    background-color: #e6c3ca;
}

/* Redundant things because archived stuff uses different html elements :pain: */
input[type="button"] {
    border: 2px solid #b48b92;
    border-radius: 4px;
    padding: 4px 8px;
    background-image: linear-gradient(to left, #f8c9d2, #f7bac5);
    background-color: #f8c9d2;
    font-size: 14px;
    text-align: center;
}
input[type="button"]:hover {
    border: 2px solid #b48b92;
    border-radius: 4px;
    background-image: linear-gradient(to left, #fcd8de, #fdc4cf);
    background-color: #fcd8de;
}
input[type="button"]:active {
    border: 2px solid #b48b92;
    border-radius: 4px;
    background-image: linear-gradient(to left, #e6c3ca, #ddabb5);
    background-color: #e6c3ca;
}
input[type="button"]:disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    background-image: linear-gradient(to left, #e6c3ca, #ddabb5);
    background-color: #e6c3ca;
}

/* Dropdowns */
select {
    border: 2px solid #b48b92;
    border-radius: 4px;
    padding: 4px 8px;
    background-image: linear-gradient(to left, #f8c9d2, #f7bac5);
    background-color: #f8c9d2;
    font-size: 14px;
}
select:disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    background-image: linear-gradient(to left, #e6c3ca, #ddabb5);
    background-color: #e6c3ca;

}

/* Text fields */
input {
    border: 2px solid #b48b92;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #fddee3;
}
input:disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #b49ea2;
}

/* Text areas, used for code outputs only in the PMD generators */
textarea {
    border: 2px solid #b48b92;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #fddee3;
    min-width: 256px;
    min-height: 64px;
    font-size: 16px;
}
textarea:disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #b49ea2;
}

/* Checkbox, excludes .side-menu because that needs to be invisible for the hamburger menu to function */
input[type="checkbox"]:not(.side-menu) {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(to left, #f8c9d2, #f7bac5);
    background-color: #f8c9d2;
    width: 20px;
    height: 20px;
    border: 2px solid #b48b92;
    border-radius: 4px;
    display: inline-block;
	position: relative;
    top: 8px;
}
input[type="checkbox"]:not(.side-menu):checked {
    border: 2px solid #b48b92;
    border-radius: 4px;
    background-image: url(checkmark.webp), linear-gradient(to left, #f1cbd3, #eeb9c3);
    background-color: #e6c3ca;
    background-size: 20px 20px;
    background-color: #e6c3ca;
}
input[type="checkbox"]:not(.side-menu):disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    background-image: linear-gradient(to left, #e6c3ca, #ddabb5);
    background-color: #e6c3ca;

}
input[type="checkbox"]:not(.side-menu):checked:disabled {
    border: 2px solid #4d3b3e;
    border-radius: 4px;
    background-image: url(checkmark-disabled.webp), linear-gradient(to left, #ddbbc2, #d3a2ac);
    background-color: #e6c3ca;

}

/* Hyperlink colors that are easier on the eyes */
a:link {
    color: #0186c4;
}
a:hover {
    color: #0186c4;
}
a:visited {
    color: #5424a1;
}

/* START CLASSES */
/* Easy centering of text */
.center-text {
    text-align: center;
}

/* For the divs that lay on top of the image background */
.text-box {
    padding: 8px 20px;
    margin: 64px 48px;
    background-color: #ffabbdb0;
    border: 4px;
    border-style: solid;
    border-color: #965c69;
    border-radius: 6px;
    box-shadow: 4px 8px #70454e7e;
}

/* Round the corners of the pfp image on the homepage */
.pfp {
    border-radius: 8px;
}

/* Round the corners a bit more on the games images on the games pages */
.games-image {
    border-radius: 12px;
}

/* Override p element defaulting to indenting */
.no-indent {
    text-indent: 0px;
}

/* Social media link styling */
/* Pads with an extra div to make it so margins are not hyperlinked */
.social-padding {
    padding: 12px;
    display: inline-block;
}

/* The main div that holds the hyperlinked stuff */
.social-link {
    padding: 8px;
    background-color: #f1cdd3;
    border: 2px;
    border-style: solid;
    border-color: #965c69;
    border-radius: 12px;
    box-shadow: none !important;
}
.social-link:hover {
    background-color: #c0d5db;
}

/* The social media logos, scaling them down to make them look better */
.social-logo {
    max-width: 192px;
}

/* IDK why, but the h2 text in this was missing an underline, so I had to add it back, oh well */
.social-text {
    text-decoration: underline;
}

/* Navbar */
/* Default behavior before reactive content is the hamburger menu being visible */
/* menu items */
.menu {
    list-style: none;
    text-align: center;
}

/* The bar itself */
.header{
    background-image: linear-gradient(to left, #dd8295, #f0bec8);
    background-color: #da92a2;
    position: relative;
    top: 0;
    padding-left: 8px;
    padding-right: 8px;
    width: calc(100% - 20px);
    border: 2px;
    border-style: solid;
    border-color: #965c69;
    border-radius: 4px;
    box-shadow: none !important;
}

/* Site Name styling */
.name {
    display: inline-block;
    color: black !important;
    font-style: normal;
    font-size: 48px;
    text-decoration: none;
    margin-left: 10px;
    position: relative;
    top: 12px;
}

/* Nav menu items */
.nav {
    width: calc(100% - 42px);
    height: 100%;
    position: relative;
    background-color: transparent;
    box-shadow: none !important;
    overflow: hidden;
    max-height: 0;
    border: 2px;
    transition: max-height .2s ease-out;
    font-size: 20px;
}

/* Make the hyperlinks in the menu not hyperlink colored, it looks ugly */
.menu a {
    display: block;
    color: black;
    text-decoration: underline;
    top: 0px;
    padding: 8px 30px;
}

/* add a light background for responsive hovering */
.menu a:hover {
    background-color: #fcd0d9;
}

/* Hamburger menu icon, IDK how this works lol */
.hamb {
    cursor: pointer;
    float: right;
    padding: 40px 20px;
}
.hamb-line {
    background: #69414a;
    display: block;
    height: 2px;
    position: relative;
    width: 24px;

}
.hamb-line::before,
.hamb-line::after {
    background: #69414a;
    content: '';
    display: block;
    height: 100%;
    position: absolute;
    transition: all .2s ease-out;
    width: 100%;
}
.hamb-line::before {
    top: 5px;
}
.hamb-line::after {
    top: -5px;
}

/* Hide checkbox that makes this menu function */
.side-menu {
    display: none;
}

/* Opens and closes the nav menu */
.side-menu:checked ~ nav {
    max-height: 100%;
    font-size: 20px; /*stupid hack workardound for a mobile browser bug, I should NOT need this */
}

/* Changes the hamburger menu to an X, IDK how this works either lol */
.side-menu:checked ~ .hamb .hamb-line {
    background: transparent;
}
.side-menu:checked ~ .hamb .hamb-line::before {
    transform: rotate(-45deg);
    top:0;
}
.side-menu:checked ~ .hamb .hamb-line::after {
    transform: rotate(45deg);
    top:0;
}

/* Subnav options */
.subnav-content {
    width: 100%;
    z-index: 1;
    padding: 20px 0 ;
    display: none;
}
.subnav-content a {
    text-decoration: underline;
    padding: 4px 0px;
    margin: 10px 0;
    text-align: center;
}

/* Display subnav content if the subnav item is hovered over */
.subnav:hover .subnav-content {
    display: block;
}

/* Remnants of the old navbar placeholder, used to make things underlined now */
.subnavbtn {
    text-decoration: underline;
}

/* START REACTIVE CONTENT FOR MOBILE VS DESKTOP */
/* Reactive content, for the navbar, it only spawns if you are in landscape with a window big enough to show the items on the bar itself */
@media (orientation: landscape) and (min-width: 1024px) {
    /* IDK why I need this */
    .name {
        position: static;
    }

    /* Put the nav items on the right side of the navbar */
    .nav {
        max-height: none;
        top: 0;
        position: relative;
        float: right;
        width: fit-content;
        background-color: transparent;
        border: 0px;
    }

    .menu {
        display: flex;
        align-items: center;
    }

    /* IDK why I have this, but I do recall I need it and added this manually */
    .menu li {
        float: left;
    }

    /* Position .regmenuitem properly */
    .regmenuitem {
        position: relative;
        bottom: 14px;
        font-size: 16px;
    }

    /* Hide the haburger menu */
    .hamb {
        display: none;
    }

    /* Subnav stuff */
    .subnav {
        position: relative;
        bottom: 14px;
    }
    .subnavbtn {
        margin-right: 4px;
        font-size: 16px;
    }

    /* Style the dropdown subnav menu */
    .subnav-content {
        padding: 8px 0px;
        display: none;
        position: fixed;
        width: 200px;
        background-image: linear-gradient(to left, #e08d9f, #ecabb8);
        background-color: #da92a2;
        border: 2px;
        border-style: solid;
        border-color: #965c69;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        font-size: 16px;
    }

    /* I need to specify the widths of the subnavs to make them not overflow the screen and stuff,
    kinda hacky but it works */
    .subnavgen {
        width: 160px;
    }
    .subnavacct {
        width: 96px;
    }

    /* not the navbar, sets the text boxes to be thinner */
    .text-box {
        margin: 64px 15%;
    }
}

/* Other misc hacks for vertical layouts */
@media (orientation: portrait) {
    /* Bigger legends on fieldsets for vertical layouts in firefox mobile */
    @-moz-document url-prefix() {
        legend {
            width: 25%;
        }
    }
}

/* DPI scaling for 150% scale */
@media only screen and (-moz-min-device-pixel-ratio: 1.5), 
only screen and (-o-min-device-pixel-ratio: 3/2), 
only screen and (-webkit-min-device-pixel-ratio: 1.5), 
only screen and (min-device-pixel-ratio: 1.5) {
    /* Checks if it is a mobile device because only those are affected by a bug that needs this hack to fix */
    @media (orientation: portrait) {
        /* Checkboxes are 1.5x the size on 150% scaling mobile devices */
        input[type="checkbox"]:not(.side-menu) {
            width: 30px;
            height: 30px;
        }
        input[type="checkbox"]:not(.side-menu):checked {
            background-size: 30px 30px;
        }
    }
}

/* DPI scaling for 200% scale */
@media only screen and (-moz-min-device-pixel-ratio: 2), 
only screen and (-o-min-device-pixel-ratio: 2/1), 
only screen and (-webkit-min-device-pixel-ratio: 2), 
only screen and (min-device-pixel-ratio: 2) {
    /* Checks if it is a mobile device because only those are affected by a bug that needs this hack to fix */
    @media (orientation: portrait) {
        /* Checkboxes are twice the size on 200% scaling mobile devices */
        input[type="checkbox"]:not(.side-menu) {
            width: 40px;
            height: 40px;
        }
        input[type="checkbox"]:not(.side-menu):checked {
            background-size: 40px 40px;
        }
    }
}

/* Load in font */
@font-face {
    font-family: "Ubuntu";
    src: local('Ubuntu Regular'), local('Ubuntu-Regular'),
         url('/assets/font/ubuntu-regular-webfont.woff2') format('woff2'),
         url('/assets/font/ubuntu-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Ubuntu";
    src: local('Ubuntu Bold'), local('Ubuntu-Bold'),
         url('/assets/font/ubuntu-bold-webfont.woff2') format('woff2'),
         url('/assets/font/ubuntu-bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Ubuntu";
    src: local('Ubuntu Italic'), local('Ubuntu-Italic'),
         url('/assets/font/ubuntu-italic-webfont.woff2') format('woff2'),
         url('/assets/font/ubuntu-italic-webfont.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Ubuntu";
    src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'),
         url('/assets/font/ubuntu-bolditalic-webfont.woff2') format('woff2'),
         url('/assets/font/ubuntu-bolditalic-webfont.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

/* For the submenu icon to replace loading in all of font-awesome */
@font-face {
    font-family: 'icomoon';
    src: url('/assets/font/icomoon.woff');
    font-weight: normal;
    font-style: normal;
}
.icomoon {
    display: inline-block;
    font-family: 'icomoon';
    text-decoration: none;
    font-style: normal;
}
.icomoon-caret-down:after {
    content: "\e900";
}