:root {
    --text-color: #333;
    --bg-color: #f1f1f1;
    --primary-color: #b130cc;
    --secondary-color: blue;
}

*,
*:after,
*:before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

html {
    font-size: 62.5%; /*10px*/
}

body {
    width: 100%;
    font-size: 1.2rem;
    list-style-type: none;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: 100%;
}

.flex-auto {
    flex: 1 1 auto;
}

.navbar-brand img {
    width: auto;
    height: 3.5rem;
    display: block;
}

nav .navbar-nav .nav-item {
    font-weight: bold;
    height: 100%;
}

nav .navbar-nav .nav-item:not(:last-child) {
    margin-right: 1.5rem;
}

nav .navbar-nav .nav-item .nav-link {
    position: relative;
    transition: color .15s ease;
    font-size: 1.1rem;
}

nav .navbar-nav .nav-item .nav-link.active::after {
    content: '';
    position: absolute;
    top: 100%;
    transform: translateY(-100%);
    left: 0;
    width: 100%;
    height: .3rem;
    border-radius: 1px;
    background-color: var(--primary-color);
}

nav .navbar-nav .nav-item .nav-link:hover {
    color: var(--primary-color);
}

header,
footer {
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.section-title {
    font-size: calc(1.7rem + .7vw);
    font-weight: bolder;
}

.container {
    padding: 0 1.4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card,
.card-header,
.card-body,
.card-footer {
    background-color: transparent;
    padding: 0;
    border: unset;
    border-radius: 0;
}

.card-body {
    flex: unset !important;
}

.flip-container {
    width: 100%;
    max-width: 470px;
    height: 30vh;
    max-height: 290px;
    min-height: 270px;
    perspective: 1000px;
}

.flip-container.flipped .flipper{
    transform: rotateY(180deg);
}

.flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s;
    border-radius: 2rem;
    perspective: 1000px;
    transform-style: preserve-3d;
    transform-origin: center center;
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 400px;
    background-size: cover;
    background-repeat: no-repeat;
    backface-visibility: hidden;
    border-radius: 2.3rem;
    font-size: 1rem;
    padding: 1rem 2.5rem;
    border: 5px solid #fff;
    background-color: #238c42   ;
}

#flipContainer {
    text-shadow: 0 0 2px #000;
}

.card-back {
    padding: 2rem 2.5rem;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
    padding-bottom: 0 !important;
}

.card-front::before,
.card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    background-size: calc(100% - 8px);
    background-position: center;
    border-radius: 2rem;
}

.card-front .card-body,
.card-front .card-header {
    animation: showCardContent 1.5s .25s ease both;
}

@keyframes showCardContent {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.card-front::before {
    background-image: linear-gradient(to top, rgb(0, 29, 7) 30%, rgba(0, 44, 10, .1) 100%);
}

.card-back::before {
    background-image: linear-gradient(to bottom, rgba(0, 29, 7, .7) 35%, rgba(0, 44, 10, .3) 100%);
}

.card-front [class^="card-"],
.card-back [class^="card-"] {
    position: relative;
    z-index: 2;
}

.card-infos {
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .card-infos {
        font-size: .9rem;
    }
}

.card-infos p,
.card-infos span {
    text-transform: uppercase;
    letter-spacing: .05rem;
    margin-bottom: .7rem;
}

.card-validity {
    color: #f3f3f3;
    font-weight: 500;
    font-size: 1.35em;
}

.card-back p {
    color: #f3f3f3;
    font-weight: 500;
    font-size: calc(1.3em + .05vw);
    line-height: 1.8;
}

.card-back a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bolder;
}

.card-back .qr-code {
    width: calc(10em + 1vw);
    height: calc(10em + 1vw);
    min-width: calc(10em + 1vw);
    min-height: calc(10em + 1vw);
    max-width: 100%;
    border: 2px solid white;
    background: white;
}

.card-back .qr-code img {
    object-fit: cover;
    max-width: 100%;
}

.card-back .bar-code {
    width: 100%;
    height: calc(4em + 1vw);
    padding: .5rem 1rem;
    /*background-color: rgba(255, 255, 255, 1);*/
}

#code128{
    border-radius: 5px;
}

.card-back .bar-code > * {
    object-fit: cover;
    height: auto;
}

#card_qrcode img,
#card_barcode svg,
#card_qrcode canvas,
#card_barcode canvas {
    max-width: 100%
}

.card-front .owner-name {
    color: #fff;
    font-weight: bolder;
    font-size: 2em;
}

.card-front .owner-picture {
    height: calc(8em + .6vw);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 3px solid #fff;
    background-color: #000;
    overflow: hidden;
    object-fit: cover;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.card-front .owner-picture img[src*="https://cartao.d9.app/assets/img/noImage.png"] {
    filter: invert(1);
    padding: 10px;
}

.contour {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    z-index: 2;
    border-radius: 2.3rem;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
    pointer-events: none;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: #333333 !important;
}

.border-bottom {
    border-color: #d4d4d4 !important;
}

.card-front .owner-cpf {
    color: #f3f3f3;
    font-weight: bold;
    font-size: 1.8em;
}

.card-front .card-code {
    text-transform: none !important;
    color: #f3f3f3;
    font-weight: 600;
    font-size: 1.3em;
}

.card-front .association-name {
    width: auto;
    padding: 0 8px;
    height: 3rem;
    background-color: rgba(31, 31, 31, 1);
    margin-top: .5rem !important;
}

.card-front .association-logo {
    width: 100%;
    height: auto;
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.action-buttons {
    max-width: 800px;
    gap: 1rem;
}

.action-btn {
    width: calc(25% - 1rem);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1.3rem .6rem !important;
    background: transparent;
    color: var(--primary-color);
    border: unset;
    font-size: calc(.9rem + .15vw) !important;
    font-weight: 500;
    cursor: pointer;
    box-shadow: unset;
    transition: all .2s ease;
}

.action-btn svg {
    margin-bottom: .6rem;
    width: 1.8rem;
    height: 1.8rem;
}

.action-btn:hover {
    background-color: rgba(177, 48, 204, .1);
}

.fullScreen header,
.fullScreen .action-buttons {
    display: none !important;
}

.fullScreen .btn-exit-full-screen {
    display: block !important;
}

.fullScreen .flip-container {
    width: calc(100vw - 2.8rem);
    max-width: 490px;
    height: 76vh;
    max-height: 450px;
}

.fullScreen .select-card-text {
    display: block !important;
}

.fullScreen .owner-picture {
    height: calc(8em + 2vw);
}

.btn-exit-full-screen {
    position: fixed;
    top: 5%;
    right: 3%;
    padding: .25rem !important;
    transition: color .15s ease;
    color: #717171;
    box-shadow: unset !important;
    transition: all .15s ease;
}

.btn-exit-full-screen svg {
    width: 7rem;
    height: 7rem;
}

.btn-exit-full-screen:hover,
.btn-exit-full-screen:focus {
    color: #000;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.fullScreen .card-back .qr-code {
    min-width: calc(12em + 1vw) !important;
    min-height: calc(12em + 1vw) !important;
}

.fullScreen .card-back .bar-code {
    height: calc(4em + 2.5vw);
}

.select-card-text {
    color: #242424;
}

.shader {
    overflow: hidden;
    backface-visibility: hidden;
}

.shader-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.specular {
    mix-blend-mode: screen;
    background-attachment: fixed;
    background-image: linear-gradient(180deg, black 20%, #61a653 35%, #238c42, #08f559 80%, black);
    background-position: center;
    opacity: .3;
}

.card-back .specular {
    opacity: .2;
}

.mask {
    mix-blend-mode: luminosity;
    background-image: url('assets/img/shaderMask.jpg');
    background-size: cover;
    background-repeat: repeat;
    animation: shader 30s linear infinite alternate;
}

.btn {
    outline: none !important;
    border: unset !important;
    box-shadow: unset !important;
    transition: background-color .15s ease, color .15s ease;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: textfield;
}

.form-control,
.form-select,
.btn {
    border-radius: .75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color) !important;
}

.validate-fornm .input,
.validate-form .btn {
    min-height: 5rem;
}

.flip-container .text-muted {
    color: #f3f3f3 !important;
}

@keyframes shader {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

.alert-message-list {
    position: fixed;
    top: 3.5%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 350px;
    height: auto;
    z-index: 9999;
    visibility: hidden;
}

.alert-message-list .alert-message-item {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 1.5em;
    background-color: var(--background-color);
    box-shadow: rgba(99, 99, 99, 0.2) 0 2px 8px 0;
    color: #fff !important;
    border-radius: .25rem;
    cursor: pointer;
    opacity: 1;
    transform: scale(.7);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-message-list .alert-message-item.show {
    animation: alert-fade-in .3s ease forwards;
}

@keyframes alert-fade-in {
    0% {
        opacity: 0;
        transform: scale(.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.alert-message-list .alert-message-item p {
    font-size: 1.35rem;
    font-weight: bolder;
}

.alert-message-list .alert-message-item.hidden {
    animation: alert-fade-out .3s ease forwards;
}

@keyframes alert-fade-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.alert-message-list .alert-message-item:not(:last-child) {
    margin-bottom: 1.25rem;
}

.alert-message-list .alert-message-item .alert-msg-icon,
.alert-message-list .alert-message-item .alert-close-icon {
    width: 2.6rem;
}

.alert-message-list .alert-message-item.success-alert {
    background-color: rgba(43,220,114,1);
}

.alert-message-list .alert-message-item.warning-alert {
    background-color: rgba(248, 110, 26, 1);
}

.alert-message-list .alert-message-item.error-alert {
    background-color: var(--bs-danger);
}

.modal .btn-close {
    background-size: 20px;
}

.fullScreen main {
    padding: 0 !important;
}

@media (max-width: 450px) {
    /* height = width; width = height */
    body:not(.fullScreen) .flip-container {
        margin: 4rem 0;
        transform: rotate(90deg);
        width: 60vh;
        max-width: unset;
        min-width: 420px;
        height: 77vw;
        max-height: 450px;
        min-height: 300px;
    }

    .card-front .owner-picture {
        height: calc(8em + 2.2vh);
    }

    .card-front .card-infos,
    .card-back {
        font-size: 1.1rem;
    }

    .card-back .qr-code {
        min-width: calc(9em + 3vh) !important;
        min-height: calc(9em + 3vh) !important;

    }

    .card-back .bar-code {
        height: calc(4em + 5vw);
    }

    .contour {
        box-shadow: rgba(50, 50, 93, 0.25) 0px 0px 100px -20px, rgba(0, 0, 0, 0.3) 0px 0px 60px -30px;
    }
}

@media (min-width: 991px) {
    .flip-container {
        max-height: 270px;
    }
}


@media print {
    @page {
        size: A4;
        margin: 20mm;
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #header,
    footer {
        display: none !important;
    }

    .card-front,
    .card-back,
    .flip-container,
    .flipper,
    .contour {
        width: auto;
        height: auto;
        position: relative !important;
        transform: unset !important;
        box-shadow: unset;
    }

    .card-front .card-body,
    .card-front .card-header {
        opacity: 1 !important;
    }

    .contour {
        display: none;
    }

    .card-front .card-infos {
        font-size: .7rem;
    }

    .card-front,
    .card-back {
        width: 85.6mm;
        height: 53.98mm;
        box-shadow: unset;
        min-height: unset;
    }

    .card-back {
        margin-top: 1rem;
    }

    .card-front .owner-picture {
        width: 18mm;
        height: 18mm;
    }

    .card-front .owner-picture img[src*="https://cartao.d9.app/assets/img/noImage.png"] {
        padding: 5px;
    }

    .card-front .association-logo {
        max-width: 25mm;
        max-height: 12mm;
        height: auto;
        min-width: unset !important;
    }

    .card-front .association-name {
        height: 2rem;
        font-size: .7rem !important;
    }

    .card-back .qr-code {
        --size: 19mm;
        width: var(--size);
        height: var(--size);
        min-width: var(--size);
        min-height: var(--size);
    }

    .card-back .bar-code {
        height: 6mm;
    }

    .card-back p,
    .card-back span {
        font-size: .9rem !important;
    }
}
