/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

/* Google font import */
@import url('https://fonts.googleapis.com/css2?family=Inder&family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Racing+Sans+One&display=swap');

/* Variables for website colour scheme and fonts */
:root {
    /* Colour variables */
    --fuschia-blue: #845ABF;
    --eclectic: #AAB1BF;
    --eclectic-transparent: rgba(170, 177, 191, 0.4);
    --skylla: #2182BF;
    --nasturtium-shoot: #88A649;
    --ecstatic-red: #A6121F;
    --vivid-yellow: #D9A404;
    /* Font variables */
    --main-header: "Racing Sans One";
    --sub-heading: "Prompt";
    --main-text: "Inder"
}

/* Show scrollbar all the time to stop layout shifts */
html {
    overflow-y: scroll;
}

/* Linear gradient colour for the body using root variables, applies theme background gradient across the entire page */
body {
    background-image: -webkit-gradient(linear,
            left top, right top,
            from(var(--ecstatic-red)),
            color-stop(20%, var(--skylla)),
            color-stop(80%, var(--fuschia-blue)),
            to(var(--nasturtium-shoot)));
    background-image: -o-linear-gradient(left,
            var(--ecstatic-red) 0%,
            var(--skylla) 20%,
            var(--fuschia-blue) 80%,
            var(--nasturtium-shoot) 100%);
    background-image: linear-gradient(90deg,
            var(--ecstatic-red) 0%,
            var(--skylla) 20%,
            var(--fuschia-blue) 80%,
            var(--nasturtium-shoot) 100%);
    font-family: var(--main-text);
}

/* Styling for the main container, applied to all pages */
main {
    padding-top: 2rem;
    position: relative;
}

/* Anchor links styled to match colour scheme */
a {
    color: var(--skylla);
}

/* H1 styling for titles.
Linear gradient styling in theme colours. */
h1 {
    font-family: var(--main-header);
    font-style: italic;
    margin-bottom: 0;
    padding: 0 12px 0 0;
    background: -webkit-gradient(linear, left top, right top, from(var(--ecstatic-red)), color-stop(45%, var(--vivid-yellow)), to(var(--skylla)));
    background: -o-linear-gradient(left, var(--ecstatic-red) 0%, var(--vivid-yellow) 45%, var(--skylla) 100%);
    background: linear-gradient(90deg, var(--ecstatic-red) 0%, var(--vivid-yellow) 45%, var(--skylla) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Specific styling for h3 headings */
h3 {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0.5em 0;
}

/* Heading and title styling from h2-h6 plus card titles, uses a root variable for font family and applies italic styling. */
h2,
h3,
h5,
h6,
.card-title {
    font-family: var(--sub-heading);
    font-style: italic;
}

/* Select label styling */
div label {
    display: block;
    margin-bottom: 5px;
}

/* Style disabled form control boxes to look disabled */
.form-control:disabled {
    background-color: var(--eclectic);
}

/* Styling of select form inputs and select options*/
select {
    border-radius: 16px;
    padding: 10px;
    width: 180px;
}

option {
    font-size: 1rem;
}

/* Remove bottom-margin for alerts */
.alert {
    margin-bottom: 0;
}

.navbar-brand {
    margin-right: 0;
}

/* Allocates available horizontal space in the nav bar equally between nav items */
.nav-item {
    -ms-flex-preferred-size: 0;
    flex-basis: 0;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    text-align: center;
    border: 1px solid #212529;
}

/* Block and height/width applied so the entire nav-link item becomes clickable */
.nav-link {
    display: block;
    width: 100%;
    height: 100%;
    font-style: italic;
}

/* Hover styling for nav items and nav links, and select dropdown filters, applies a golden colour and a glow. */
.nav-item:hover,
select:hover {
    background-color: var(--vivid-yellow);
    cursor: pointer;
    -webkit-transition: 0.5s ease-in;
    -o-transition: 0.5s ease-in;
    transition: 0.5s ease-in;
    outline: none;
    border-color: #9ecaed;
    -webkit-box-shadow: 0 0 10px #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
}

.nav-link:hover {
    -webkit-transition: 0.5s ease-in;
    -o-transition: 0.5s ease-in;
    transition: 0.5s ease-in;
    font-weight: bold;
    color: #000000;
}

/* Styling for active nav-items creates a glowing border */
.navbar .nav-item.active {
    background-color: var(--vivid-yellow);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    outline: none;
    border-color: #9ecaed;
    -webkit-box-shadow: 0 0 10px #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
}

/* Styles the nav-link text for active nav-items */
.navbar .nav-item.active .nav-link {
    color: #000000;
    font-weight: bold;
}

/* Hero background image applied to main container only on the home page */
.hero-bg {
    background-image: url(../images/hero-image.avif);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
}

/* Glassmorphic effect for cards and forms */
.glassmorphic {
    background: var(--eclectic-transparent);
    border-radius: 16px;
    -webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Applies h3-like styling to the universe banners on the cards */
.universe {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0.5em 0;
    font-style: italic;
}

/* Match the top corner border radius of card image, to the same px as the card itself. */
.card-img-top {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Overlay banner for the front of shop and binder cards */
.card-front-banner {
    height: 45px;
    border-radius: 0;
    border: 0;
    padding: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: absolute;
    left: 0;
    right: 0;
    top: 65%;
    -webkit-box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Overlay banner for the back of binder cards */
.card-back-banner {
    height: 45px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border: 0;
    padding: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    top: 0;
    left: 0;
    right: 0;
    position: absolute;
    -webkit-box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Remove unneeded space below h5 elements in the card banners */
.card-front-banner h5,
.card-back-banner h5 {
    margin-bottom: 0;
}


/* Initially hides the shop cards while the loaders are spinning */
.shop-card {
    display: none;
    -webkit-transition: -webkit-transform .2s;
    transition: -webkit-transform .2s;
    -o-transition: transform .2s;
    transition: transform .2s;
    transition: transform .2s, -webkit-transform .2s;
}

/* Shop cards grow on hover with a glow effect */
.shop-card:hover {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    z-index: 99;
    border-radius: 16px;
    outline: none;
    border-color: #9ecaed;
    -webkit-box-shadow: 0 0 10px #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
}

/* Glassmorphic style effects for shop and binder headings so they appear to glow at all times with no animation */
.glow {
    background: var(--eclectic-transparent);
    border-radius: 16px;
    padding: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    z-index: 99;
    outline: none;
    border-color: #9ecaed;
    -webkit-box-shadow: 0 0 10px #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
}

/* Binder flip card container, with perspective for 3D effect */
.binder-card {
    -webkit-perspective: 1000px;
    perspective: 1000px;
    background-color: transparent;
    height: 452px;
    display: none;
    -webkit-transition: -webkit-transform .2s;
    transition: -webkit-transform .2s;
    -o-transition: transform .2s;
    transition: transform .2s;
    transition: transform .2s, -webkit-transform .2s;
    border: 2px solid transparent;
    cursor: pointer;
    outline: none;
}

/* Fixed size for binder card image, changes at different screen sizes */
.binder-card img {
    height: 300px;
}

/* Transparent border on the inner container to stop layout shift on hover */
.binder-card .card-inner {
    border: 2px solid transparent;
}

/* Glowing hover effects applied to all binder cards, set on the inner container so the effects flip when the card does. */
.binder-card:hover .card-front,
.binder-card:hover .card-back {
    z-index: 99;
    border-radius: 16px;
    outline: none;
    -webkit-box-shadow: 0 0 20px #9ecaed;
    box-shadow: 0 0 20px #9ecaed;
    border: 2px solid #9ecaed;
}

/* A horizontal flip class applied on click to all binder cards*/
.binder-card.flipped .card-inner {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

/* Stripped back card title for better flex layout */
.card-title {
    padding: 0;
    margin: 0;
}

/* Container to position the front and back of the card */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    -webkit-transition: -webkit-transform 0.8s;
    transition: -webkit-transform 0.8s;
    -o-transition: transform 0.8s;
    transition: transform 0.8s;
    transition: transform 0.8s, -webkit-transform 0.8s;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
}

/* Position the front and the back of the card */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    /* Safari */
    -webkit-backface-visibility: hidden;
    /* Firefox and modern browsers */
    backface-visibility: hidden;
}

/* Styling of the back of the binder flip card, starts rotated. */
.card-back {
    border-radius: 16px;
    transform: rotateY(180deg);
}

/* Remove padding from card-body to create more space on the flex layout */
.card-body {
    padding: 0;
}

/* Rarity colours for shop card badges */
.badge.common {
    background-color: var(--eclectic);
    color: black;
}

.badge.uncommon {
    background-color: var(--nasturtium-shoot);
    color: black;
}

.badge.rare {
    background-color: var(--skylla);
    color: black;
}

.badge.epic {
    background-color: var(--fuschia-blue);
}

.badge.legendary {
    background-color: var(--vivid-yellow);
    color: black;
}

.badge.good {
    background-color: white;
    color: black;
}

.badge.bad {
    background-color: black;
    color: white;
}

.badge.neutral {
    background-color: gray;
    color: black;
}

.badge.mythic {
    background-color: gold;
    color: black;
}

/* Text styling applied only to archetypes to keep it consistent across cards and not break layout */
.archetype {
    font-size: medium;
}

/* Text styling applied only to badges to keep it consistent across cards and not break layout */
.badge {
    font-size: small;
}

/* Custom buttons, skewed to match nav items for a dynamic visual effect */
.buy-button,
.account-button {
    background-color: var(--vivid-yellow);
    color: black;
    -webkit-transform: skew(-30deg);
    -ms-transform: skew(-30deg);
    transform: skew(-30deg);
    border-radius: 0;
    padding-left: 8px;
    padding-right: 8px;
}

.cancel {
    background-color: var(--ecstatic-red);
    color: white;
    -webkit-transform: skew(-30deg);
    -ms-transform: skew(-30deg);
    transform: skew(-30deg);
    border-radius: 0;
}

.btn:disabled {
    background-color: var(--ecstatic-red);
    color: white;
    -webkit-transform: skew(-30deg);
    -ms-transform: skew(-30deg);
    transform: skew(-30deg);
    border-radius: 0;
    opacity: 1;
    border: none;
}

/* Unskew class applied to the skewed items so the text doesn't mutate visually */
.unskew {
    display: inline-block;
    -webkit-transform: skew(30deg);
    -ms-transform: skew(30deg);
    transform: skew(30deg);
    font-style: italic;
    font-weight: bold;
    padding-top: 3px;
    padding-bottom: 3px;
}

/* Buttons change colour and pulse on hover */
.buy-button:hover,
.account-button:hover,
.cancel:hover {
    background-color: var(--skylla);
    color: white;
    -webkit-transform: skew(-30deg);
    -ms-transform: skew(-30deg);
    transform: skew(-30deg);
    -webkit-animation: pulse 2s infinite;
    animation: pulse 2s infinite;
}

/* Pulsing animation used when hovering over buttons, skewed to match the buttons and nav items */
@-webkit-keyframes pulse {
    0% {
        -webkit-transform: scale(0.95);
        transform: scale(0.95);
        -webkit-transform: skew(-30deg);
        transform: skew(-30deg);
        -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
    }

    70% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform: skew(-30deg);
        transform: skew(-30deg);
        -webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }

    100% {
        -webkit-transform: scale(0.95);
        transform: scale(0.95);
        -webkit-transform: skew(-30deg);
        transform: skew(-30deg);
        -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes pulse {
    0% {
        -webkit-transform: scale(0.95);
        transform: scale(0.95);
        -webkit-transform: skew(-30deg);
        transform: skew(-30deg);
        -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
    }

    70% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform: skew(-30deg);
        transform: skew(-30deg);
        -webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }

    100% {
        -webkit-transform: scale(0.95);
        transform: scale(0.95);
        -webkit-transform: skew(-30deg);
        transform: skew(-30deg);
        -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

/* Spinning loader while the dom loads content and the file content pulls through to the cards */
.loader {
    border-top: 16px solid var(--ecstatic-red);
    border-right: 16px solid var(--skylla);
    border-bottom: 16px solid var(--fuschia-blue);
    border-left: 16px solid var(--nasturtium-shoot);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

/* Spinning animations for screen loader on shop page. Works cross-browser. */
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* Hover colour for the round socials icons */
.socials-hover:hover {
    border-radius: 5%;
    background-color: var(--vivid-yellow);
    cursor: pointer;
    -webkit-transition: 0.5s ease-in;
    -o-transition: 0.5s ease-in;
    transition: 0.5s ease-in;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: none;
    border-color: #9ecaed;
    -webkit-box-shadow: 0 0 10px #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
}

/* Hover colour for the square socials icon */
.socials-hover-square:hover {
    background-color: var(--vivid-yellow);
    border-radius: 5%;
    cursor: pointer;
    -webkit-transition: 0.5s ease-in;
    -o-transition: 0.5s ease-in;
    transition: 0.5s ease-in;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: none;
    border-color: #9ecaed;
    -webkit-box-shadow: 0 0 10px #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
}

/* Media queries start here: adjusts card sizes, banners, fonts and content spacing across screen sizes from 320px up to 2560px */
/* Media query for screens 320px and up */
@media screen and (min-width:320px) {
    footer {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .nav-link {
        color: white;
    }

    h1 {
        font-size: 2.2rem;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .card-subtitle {
        font-size: 1.5rem;
    }

    #shop-section,
    #binder-section {
        padding-bottom: 100px;
    }

    /* Pushes the main content down so it doesn't hide behind the navbar and stops overflow */
    main {
        padding-left: 20px;
        padding-right: 20px;
        margin-top: 50px;
    }

    /* Position of the banner on the front of the shop and binder cards, values calculated visually to align over card images. */
    .card-front-banner {
        top: 255px;
    }

    /* Shop and binder card custom sizes to ensure content doesn't overflow at different screen sizes */
    .shop-card {
        min-width: 270px;
        min-height: 300px;
    }

    .binder-card {
        min-width: 270px;
    }

    .shop-card img {
        height: 300px;
    }

    /* Prevents layout collapse in flex containers */
    .character-card-body {
        height: 148px;
    }
}

/* Media query for screens 768px and up */
@media screen and (min-width:768px) {
    h1 {
        font-size: 2.5rem;
    }

    /* Custom sizing for the collapsed navbar, so hover effects don't stretch full screen */
    .navbar-nav {
        width: 40%;
    }

    #shop-section,
    #binder-section {
        padding-bottom: 0;
    }

    .shop-card {
        min-width: 320px;
        min-height: 320px;
    }

    .shop-card img,
    .binder-card img {
        height: 390px;
    }

    .card-front-banner {
        top: 345px;
    }

    .binder-card {
        height: 527px;
        min-width: 320px;
    }

    .character-card-body {
        height: 120px;
    }
}

/* media query for screens 1024px and up*/
@media screen and (min-width:1024px) {

    h1 {
        font-size: 1.8rem;
    }

    p {
        font-size: 1rem;
    }

    .navbar-nav {
        width: 40%;
    }

    .shop-card {
        min-width: 360px;
        min-height: 320px;
    }

    .binder-card {
        min-width: 360px;
    }
}

@media screen and (min-width:1200px) {

    /* Skew transform applied to create forward-leaning nav items for a dynamic effect on larger screens only */
    .nav-item {
        background-color: var(--skylla);
        -webkit-transform: skew(-30deg);
        -ms-transform: skew(-30deg);
        transform: skew(-30deg);
    }

    /* Opposite skew applied to the nav link so the text looks straight in the nav items, only on larger screens */
    .nav-link {
        -webkit-transform: skew(30deg);
        -ms-transform: skew(30deg);
        transform: skew(30deg);
        display: inline-block;
        text-decoration: none;
        color: black;
    }
}
/* Media query for screens 1440px and up*/
@media screen and (min-width:1440px) {

    h1 {
        font-size: 2.3rem;
    }

    p {
        font-size: 1.2rem;
    }

    select {
        font-size: 1.1rem;
    }

    option {
        font-size: 1.1rem;
    }

    div label {
        font-size: 1.1rem;
    }

    .navbar-nav {
        width: 85%;
        padding-right: 10px;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .card-front-banner {
        top: 346px;
    }
}

/* Media query for screens 1700px and up*/
@media screen and (min-width:1700px) {

    h1 {
        font-size: 2.6rem;
    }

    select {
        margin-bottom: 1rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    #shop-heading,
    #binder-heading,
    #profile-heading {
        margin-top: 2.5rem !important;
    }
}

/* Media query for screens 2560px and up: scale all elements proportionally to maintain readability and spacing */
@media screen and (min-width:2560px) {
    footer {
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
        font-size: 1.9rem;
    }

    h1 {
        font-size: 4rem;
        padding: 0 48px 0 10px;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .card-subtitle {
        font-size: 2.7rem;
    }

    h3,
    h4,
    h5,
    h6 {
        font-size: 2.4rem;
    }

    p {
        font-size: 2rem;
    }

    select {
        font-size: 1.8rem;
        margin-bottom: 15px;
        width: 260px;
    }

    div label {
        margin-top: 15px;
        font-size: 1.8rem;
    }

    option {
        font-size: 1rem;
    }

    #id_remember {
        font-size: 1.8rem;
    }

    li {
        font-size: 1.8rem;
    }

    .form-control {
        font-size: 1.8rem;
    }

    a {
        font-size: 1.8rem;
    }

    /* Scales hero content proportionately on large screens */
    .hero-card .card-title,
    .heading {
        font-size: 3rem;
    }

    .navbar {
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
        padding-left: 20px;
        font-size: 1.9rem;
    }

    .navbar-nav {
        padding-right: 30px;
    }

    .nav-link {
        font-size: 2rem;
    }

    #hero-section {
        max-width: 2200px;
        max-height: 1000px;
    }

    #hero-section .col {
        padding: 0 1.2rem 2.5rem 1.2rem;
    }

    /* Scales hero-card content proportionately on larger screen sizes. */
    .hero-card {
        font-size: 1.8rem;
        padding: 2.2rem;
    }

    /* Large margin on page headings to prevent crowding and give content room to breathe */
    #shop-heading,
    #binder-heading,
    #profile-heading {
        margin-top: 6rem !important;
    }

    .container {
        max-width: 1600px;
    }

    .shop-card {
        min-width: 440px;
        min-height: 320px;
    }

    .binder-card {
        height: 542px;
        min-width: 440px;
    }

    .back-text {
        font-size: 1.4rem;
    }

    .character-card-body {
        height: 152px;
    }

    .glow {
        padding: 1rem;
    }

    .badge {
        font-size: 1.1rem;
    }

    .buy-button,
    .cancel,
    .account-button {
        font-size: 1.6rem;
        margin-top: 10px;
        margin-bottom: 10px;
        padding-right: 10px;
        padding-left: 10px;
    }

    #messages {
        font-size: 1.5rem;
    }

    /* Important used to override Bootstrap mt helper class, which has important attached to it. */
    #signup-section,
    #login-section,
    #logout-section {
        margin-top: 5rem !important;
    }
}