/* Universal selector to target all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Ensures padding and border are included in element's total width/height */
}

/* Reset specific element styles for better consistency */
html {
  -webkit-text-size-adjust: 100%; /* Prevents text zooming on mobile devices */
}

body {
    position: relative;
  line-height: 1.5; /* Sets a consistent line height for better readability */
  -webkit-font-smoothing: antialiased; /* Improves font rendering on macOS */
}

img, picture, video, canvas, svg {
  display: block; /* Prevents unwanted space below inline images */
  max-width: 100%; /* Ensures images are responsive and don't overflow their containers */
}

input, button, textarea, select {
  font: inherit; /* Inherits font styles from parent elements */
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word; /* Prevents long words from overflowing containers */
}

.responsive-padding {
    position: relative;
    width: 100%;
    height: 1.5vw;
}

@font-face {
    font-family: 'Digital';
    src: url('../_fonts/7segment.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Swansea';
    src: url('../_fonts/Swansea-q3pd.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html,
body {
    margin: 0;
    background-color: #282828;
}

body {
  display: flex; /* Make the body a flex container */
  align-items: center; /* Vertically center items within the body */
  justify-content: center; /* Horizontally center items */
}
    
input[type=text] {
    position: relative;
    display: block;
    width: 90%;
    margin: auto;
    text-align: center;
    padding: 5px;
    font-size: clamp(12px, 3vw, 34px);
    font-weight: bold;
    border-radius: 10px;
    border: none;
    background-color: rgba(0,0,0,0.25);
    color: #fff;
    transform: scale(1);
    transition: transform .5s ;
    transition-timing-function: cubic-bezier(0.250, 0.250, 0.565, 1.325);
}

input[type=text].hidden {
    transform: scale(0);
}

#preAuthAmount {
    display: inline;
    width: 60%;
}

#preAuthAmount-container {
    transform: scale(1);
    transition: transform .5s ;
    transition-timing-function: cubic-bezier(0.250, 0.250, 0.565, 1.325);
}

#preAuthAmount-container.hidden {
    transform: scale(0);
}

#credit-card {
    position: absolute;
    opacity: 0;
    bottom: 5%;
    left: 0;
    width: 50%;
    max-width: 100%;
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.5s;
}

#credit-card.animated {
    animation-name: cardAnimation;
    animation-duration: 3s;
    transition-timing-function: cubic-bezier(0.000, 0.980, 1.000, 0.265);
    transform: rotate3d(1, 1, 1, 0deg) scale(0.75) translateX(60%) translateY(10%);
}

@keyframes cardAnimation {
    0% {
        opacity: 0;
        transform: rotate3d(1, 1, 1, 30deg) translateX(30%);
        box-shadow: 5px 5px 50px 0px #000;
    }

    50% {
        opacity: 1;
        transform: rotate3d(1, 1, 1, 0deg) scale(0.75) translateX(60%) translateY(10%);
        box-shadow: 5px 5px 15px 0px #000;
    }

    100% {
        opacity: 0;
        transform: rotate3d(1, 1, 1, -30deg) scale(1) translateX(90%) translateY(20%);
        box-shadow: 5px 5px 50px 0px #000;
    }
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.block-center {
    margin: auto;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.d-none {
    display: none;
}

.invisible {
    visibility: hidden;
}

.cursor {
    background-color: #666;
    filter: invert(100%);
}

.delay1 {
    transition-delay: .5s !important;
}
.delay2 {
    transition-delay: .7s !important;
}
.delay3 {
    transition-delay: .9s !important;
}
.delay4 {
    transition-delay: 1.1s !important;
}
.delay5 {
    transition-delay: 1.3s !important;
}
.delay6 {
    transition-delay: 1.5s !important;
}


.container {
    position: relative;
    width: 100%;
    max-width: 1144px;
    perspective: 1000px;
    overflow: hidden;
    margin: auto;
}

@media screen and (max-width: 780px) {
    body {
        overflow: hidden;
    }

    .container {
        position: absolute;
        max-width: 780px;
        min-width: 350px;
        top: 0;
        left: 0;
    }

    .container #live-bottom-display {
        /*min-width:234px;*/
    }

    .container #live-top-display {
        /*min-width:205px;*/
    }
}

.container .bg-piece {
    position: relative;
    width: 100%;
    height: auto;
}

.container .bg-piece .stop-btn {
    position: absolute;
    cursor: pointer;
    width: 23%;
    bottom: 0;
    right: 0.15%;
}

.container #live-top-display {
    position: absolute;
    width: 41%;
    max-width: 470px;
    height: 100%;
    left: 29%;
    top: 0;
    padding: 1%;
    color: #444;
    font-family: 'Digital'; 
    font-size: clamp(24px, 7.5vw, 85px);
    text-align: right;
}

.container #live-top-display p.amount {
    font-size: clamp(40px, 11.5vw, 140px);
    line-height: 100%;
}

.container #live-top-display p.quantity {
    font-size: clamp(24px, 8vw, 100px);
    line-height: 100%;
}

.container #preAuth-section .nfc {
    position: relative;
    opacity: 1;
    width: 50%;
    transition: all .5s;
}

.container #preAuth-section .nfc.invisible {
    opacity: 0;
}

.container #report-section {
    position: relative;
    height: 100%;
}

.container #report-section .report-content {
    position: relative;
    transform: scale(1);
    transition: transform 0.3s;
    transition-delay: 0.3s;
}

.container #report-section .report-content p {
    opacity: 1;
    transition: opacity .25s;
}
.container #report-section .report-content p.hidden {
    opacity: 0;
}

.container #report-section .pump-icon {
    position: absolute;
    width: 70%;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.75;
}

.container #report-section .pump-icon.hidden {
    opacity: 0;
}

.container #report-section .stop-pumping {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    font-weight: bold;
}

.container #report-section img.logo {
    opacity: 1;
    position: relative;
    display: block;
    width: 100%;
    box-shadow: 0px 0px 10px #666;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.container #report-section img.logo.hidden {
    opacity: 0;
    position: relative;
    transform: translateY(-100%);
}

.container #loyaltyID-section, 
.container #quantity-section, 
.container #report-section {
    opacity: 1;
    transition: all .5s;
}
.container #loyaltyID-section.hidden, 
.container #quantity-section.hidden, 
.container #report-section.hidden {
    opacity: 0;
    transform: scale(0);
}

.container #live-bottom-display {
    position: absolute;
    width: 46.5%;
    max-width: 533px;
    height: 100%;
    left: 25.5%;
    top: 0;
    overflow: hidden;
    font-family: 'Swansea'; 
    font-size: clamp(12px, 2.75vw, 24px);
    color: #444;
}

.container #keypad {
    position: absolute;
    display: flex;
    left: 0;
    width: 100%;
    bottom: 0;
    height: 65%;
    background-image: url('../_img/keypad-bg.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: translateY(0);
    transition: transform .5s;
    transition-delay: .25s;
}

.container #keypad.hidden {
    transform: translateY(100%);
}

.container #keypad .column {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    align-content: center;
    justify-content: center;
    width: 40%;
    height: 100%;
    margin: auto;
}

.container #keypad .column .key {
    position: relative;
    flex: 0 0 calc(33% - 15px);
    height: 0;
    padding-bottom: calc(33% - 15px);
    background-size: 200% 100%;
    background-position: 0% 0;
}

@media screen and (max-width: 780px) {
    .container #keypad .column {
        width: 70%;
    }

    .container #keypad .column .key {

        flex: 0 0 calc(20% - 5px);
        height: 0;
        padding-bottom: calc(20% - 5px);
    }
}




.container #keypad .column .key:after {
    display: none;
}

.container #keypad .column #key1.key {
    background-image: url('../_img/keypad-1.png');
}
.container #keypad .column #key2.key {
    background-image: url('../_img/keypad-2.png');
}
.container #keypad .column #key3.key {
    background-image: url('../_img/keypad-3.png');
}
.container #keypad .column #key4.key {
    background-image: url('../_img/keypad-4.png');
}
.container #keypad .column #key5.key {
    background-image: url('../_img/keypad-5.png');
}
.container #keypad .column #key6.key {
    background-image: url('../_img/keypad-6.png');
}
.container #keypad .column #key7.key {
    background-image: url('../_img/keypad-7.png');
}
.container #keypad .column #key8.key {
    background-image: url('../_img/keypad-8.png');
}
.container #keypad .column #key9.key {
    background-image: url('../_img/keypad-9.png');
}
.container #keypad .column #key0.key {
    background-image: url('../_img/keypad-0.png');
}
.container #keypad .column #key-del.key {
    background-image: url('../_img/keypad-del.png');
}
.container #keypad .column #key-ok.key {
    background-image: url('../_img/keypad-ok.png');
}
.container #keypad .column .key.on {
    background-position: 100% 0 !important;
}