/*html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}
}*/


:root {
    --bs-primary: #8C5818;
}

body, input, select {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #273b5f;
}

a {
    color: var(--bs-primary);
    text-decoration: none;
}

.unavailable {
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

#loader-container {
    text-align: center;
}

.bg-brown {
    background-color: #884a00 !important;
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    border-top: 3px solid #8c5818;
    border-right: 3px solid transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
} 

.separator {
    width: 100%;
}

.separator > img {
    max-width: 100%;
}

.site-hero {
    margin-top: 50px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-banner {
    border: 5px solid #FFD096;
    padding: 10px;
    border-radius: 10px;
}

.site-banner > img {
    max-width: 100%;
}

.title-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title, .card-title {
    font-family: "Crimson Text", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 60px;
    text-transform: uppercase;
    color: #8C5818;
}

.cta-btns {
    margin-top: 50px;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.cta {
    width: 300px;
    height: 100px;
    border: 4px solid #FFD096;
    border-radius: 10px;
    text-align: center;
    line-height: 1.6;
    text-decoration: none;
    font-family: "Crimson Text", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 3.2rem;
    color: #8C5818;
}

@media(max-width: 930px) {
    .cta-btns {
        flex-direction: column;
        gap: 20px;
    }

    .cta {
        font-size: 3rem;
    }
}

.cta:hover, .cta:active {
    color: #8C5818;
    border: 4px solid #845b28;
}

.cta-active {
    background-color: #FFE5C6;
}

@media (max-width: 1200px) {
    .site-hero {
        margin-top: 50px;
        margin-bottom: 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        text-align: center;
    }
}

@media (max-width: 650px) {
    .title {
        font-size: 40px;
    }

    .decoration {
        width: 100%;
    }

    .decoration > img {
        max-width: 100%;
    }
}

.card {
    width: 250px;
    height: 340px;
    display: flex;
    justify-content: center;
}

.card, .card-lg {
    background-size: 101%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0px 2px 15px #506a79;
    cursor: pointer;
}

.card-details-image {
    position: relative;
}

.btn-img-download {
    position: absolute;
    right: 0px;
    bottom: 0px;
}

.card:hover {
    box-shadow: 0px 2px 25px #506a79;
    transition: 0.3s;
}

.card-details-section {
    margin-top: 50px;
    display: flex;
    align-items: start;
    gap: 60px;
}

.card-details-row {
    display: flex;
    gap: 30px;
    align-items: center;
}

.deck-commander-pill {
    border-color: darkslateblue !important;
    color: darkslateblue !important;
}

.deck-unpublished {
    border-color: blueviolet !important;
    color: blueviolet !important;
}

.type {
    border-radius: 100px;
    min-width: 50px;
    text-align: center;
    display: block;
    padding: 5px 15px;
    color: #ffffff;
}

.Ability {
    background-color: #6fba0e;
}

.Spell {
    background-color: #3b026e;
}

.Resource {
    background-color: #0a1414;
}

.Unit, .Energy {
    background-color: #028cbe;
}

.Core {
    background-color: #b98d40;
}

.Reserve, .Combat {
    background-color: #8e1000;
}

.Commander {
    background-color: #000000;
}

.ArtSeries {
    background-color: #989898;
}

.mt {
    margin-top: 15px;
}

.mb {
    margin-bottom: 15px;
}

.faction, .specialization,
.attribute, .faction-sub-type {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #aaa;
    padding: 5px 15px;
    border-radius: 100px;
}

.stat-img {
    width: 30px;
    height: 30px;
}

.stat-img > img {
    max-width: 100%;
    height: 100%;
}

.abilities {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 200px);
    grid-gap: 10px;
}

.ability {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px;
    border: 1px solid #ccc;
    border-radius: 100px;
}

.ability-label {
    font-family: monospace;
    text-transform: uppercase;
/*    font-weight: 600;*/
    font-size: 0.9rem;
}

.ability-stat {
    display: block;
    font-weight: 700;   
}

.card-text {
    margin-top: 50px;
    margin-bottom: 15px;
    border: 1px solid #aaa;
    padding: 0px 20px;
    border-radius: 6px;
}

.card-text > .rule-text-label {
    position: relative;
    top: -23px;
    text-align: center;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #aaa;
    border-radius: 100px;
    max-width: 100px;
    font-weight: bold;
    background-color: #fff;
}

.card-text > .rule-text {
    margin-top: -20px;
}

.secondary-info {
    margin: 15px 0px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.secondary-attr {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: bold;
    color: rgba(140, 88, 24, 0.9);
    padding-top: 10px;
}

@media (max-width: 1000px) {
    .card-details-section {
        margin-top: 50px;
        flex-direction: column;
        align-items: center;
    }

    .card-title {
        font-size: 40px;
    }

    .card-details {
        text-align: center;
    }

    .card-details-row, .abilities {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .card-title {
        font-size: 30px;
    }

    .abilities {
        grid-template-columns: repeat(2, 200px);
    }

    .secondary-info {
        grid-template-columns: repeat(1, 1fr);
    }

    .sep {
        display: none;
    }
}

@media (max-width: 450px) {
    .card-details-row {
        flex-direction: column;
        gap: 15px;
    }

    .abilities {
        grid-template-columns: repeat(1, 200px);
    }
}

#card-display, .deck-card-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    grid-row-gap: 40px;
    margin-bottom: 50px;
}

#load-more, #search {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

#load-more > button, #search > button {
    width: 200px;
    height: 50px;
    border: 4px solid #FFD096;
    border-radius: 10px;
    text-align: center;
    line-height: 1.6;
    text-decoration: none;
    font-family: "Cormorant Garamond", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 20px;
    color: #8C5818;
    background-color: #FFE5C6;
    cursor: pointer;
}

.filters {
    width: 80%;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    #card-display, .deck-card-display {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .deck-card-display {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 900px) {
    #card-display {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 590px) {
    #card-display {
        grid-template-columns: repeat(1, 1fr);
    }
}

.btn-outline-dark {
    color: #8C5818;
    border: 1px solid #FFD096;
}

.btn-outline-dark:hover {
    color: white;
    background-color: #8C5818;
    border: 1px solid #8C5818;
}

#card-viewer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
}

.toast, .toast-body {
    z-index: 9000;
}

.card-lg {
    aspect-ratio: 250 / 340;
    width: 70vh;
    height: auto;
}

.field-validation-error {
    font-size: 12px;
    color: red;
}

/* -- deckbuilder -- */

#deck-details {
    position: fixed;
    left: 0px;
    bottom: 0px;
    height: 85px;
    width: 100%;
    border-radius: 20px 20px 0px 0px;
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid black;
    box-shadow: rgb(0, 0, 0) 10px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
    background-color: #fff;
}

.deck-stat-row {
    display: flex;
    justify-content: space-evenly;
}

#deck-stats, #deck-stats-edit {
    min-width: 25%;
    display: flex;
    justify-content: space-between;
}

#deck-stats-edit {
    gap: 25px;
}

@media(max-width: 1320px) {
    #deck-stats, #deck-stats-edit {
        min-width: 30%;
    }
}

@media(max-width: 1080px) {
    #deck-details {
        height: 150px;
    }

    .deck-row {
        justify-content: space-between;
    }

    #deck-stats, #deck-stats-edit {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    #deck-edit-sep {
        display: none !important;
    }

    #deck-stats {
        grid-gap: 20px;
    }

    #deck-stats-edit {
        grid-gap: 8px;
    }

    .action-btns {
        flex-direction: column;
    }

    .action-btns > button {
        width: 118px;
    }
}

#deck-stats > .stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

#deck-stats-edit > .stat {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

#deck-stats > .stat > .stat-text {
    font-size: 12px;
    color: #555;
    font-weight: bold;
}

#deck-stats-edit > .stat > .stat-text {
    font-size: 13px;
    color: #555;
}

#deck-stats-edit > .stat > .stat-number {
    font-size: 13px;
    color: #555;
    font-weight: bold;
}

.action-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.deck-action-btn {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,23, 0.7);
    color: #fff;
    border: 1px solid #ddd;
    font-size: 30px;
    border-radius: 100%;
}

.deck-action-btn-enh, .deck-quantity {
    background-color: rgb(145, 96, 35);
    border: 3px solid rgb(255, 213, 163);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

h5 {
    font-family: "Crimson Text", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #8C5818;
}

.deck-card {
    width: 100px;
    height: 120px;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 5px;
    box-shadow: 0px 1px 5px #506a79;
    cursor: pointer;
    display: flex;
    justify-content: center;
    position: relative;
}

.deck-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
}

@media(max-width: 520px) {
    .deck-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 400px) {
    .deck-row {
        grid-gap: 10px;
    }
}

.deck-quantity {
    position: absolute;
    bottom: -5px;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-commander {
    width: 160px;
}

.deck-commander-img {
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    border-radius: 50px;
    height: 160px;
    width: 160px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: top right !important;
}

#commander-card-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 15px;
}

#commander-card-preview > .card {
    aspect-ratio: 250 / 340;
    max-width: 180px;
    height: auto;
}

@media (max-width: 1200px) {
    #commander-card-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 810px) {
    #commander-card-preview {
        place-items: center;
        grid-template-columns: repeat(1, 1fr);
    }
}