.payment-terminal {
    width: 220px;
    border: 2px solid #a33;
    padding: 20px;
    border-radius: 10px;
    background-color: #252424;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: #fff;
    position: relative;
}

.payment-terminal.backside {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    width: 260px; /* Match front terminal width (220 + 40 padding) */
}

.fixed-back {
    flex: 2; /* 2/3 of the height */
    border-bottom: 2px solid #111;
    border-radius: 8px 8px 0 0;
}

.battery-compartment {
    flex: 1; /* 1/3 of the height */
    position: relative;
}

.back-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2a2a2a;
    border-radius: 0 0 8px 8px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-top: 1px solid #1a1a1a;
}

.back-cover:hover {
    background-color: #333;
}

.internals {
    width: 100%;
    height: 100%;
    background-color: #111;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: inset 0 0 10px #000;
}
.button {
    width: 60px;
    height: 60px;
    margin: 5px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 25px;
}
.display {
    width: calc(100% - 12px); /* Adjusted width to fit within the terminal */
    height: 60px;
    margin-bottom: 10px;
    font-size: 18px;
    text-align: right;
    padding: 5px;
    border: 2px solid #a33;
    border-radius: 5px;
    background-color: #aaa;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}
.term-line {
    height: 18px;
    line-height: 18px;
    overflow: hidden;
    white-space: nowrap;
}
.led-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 18px;
    margin-bottom: 15px;
}

.led {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #222;
    background-color: #373737;
    box-shadow: 0 0 6px #222;
    transition: background-color 0.2s, box-shadow 0.2s;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes flash {
    0% { opacity: 1; }
    30%, 100% { opacity: 0.3; }
}

.led.blink {
    animation: blink 3s infinite;
}
.led.flash {
    animation: flash 1.5s 1;
}

.led.red.active {
    background-color: #d81a1a;
    box-shadow: 0 0 8px #a55;
}
.led.red {
    background-color: #401819;
}

.led.green.active {
    background-color: #2fd81a;
    box-shadow: 0 0 8px #3d5;
}
.led.green {
    background-color: #193820;
}

.led.yellow.active {
    background-color: #ffe600;
    box-shadow: 0 0 10px #fa0;
}
.led.yellow {
    background-color: #544d17;
}
