.paginationbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
}

.paginationbar .pagination {
    aspect-ratio: 1;
    display: inline-block;
    padding: 0.5em;
    height: 3em;
    background: none;
    border: 1px solid;
    margin: 0 0.25em;
}

.paginationbar .pagination.active{
    background: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    color: #fff;
}

table.results {
    margin: 0 auto;
}

.cardadminpage{
    display:flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    align-items: flex-start;
}

.halfwide {
    width: calc( 50% - 1.5em );
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius, .375rem);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;

    h2 {
        font-size: 1.4rem;
        padding-bottom: .35rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    }

    /* legacy 25/75 label-input rows: only for markup that has not moved to Bootstrap form classes */
    label:not(.form-label):not(.form-check-label) {
        width: calc( 25% - 0.5em );
        text-align: right;
        vertical-align: top;
        margin-top: 0.5em;
    }

    input:not(.form-control):not(.form-check-input):not([type="submit"]):not([type="button"]),
    textarea:not(.form-control),
    select:not(.form-select) {
        width: 75%;
        border-width: 0.5px;
        margin-top: 0.5em;
    }

    input.button[type="submit"] {
        margin-left: calc( 25% - 0.5em );
        margin-top: 0.5em;
    }

    .greybox {
        min-height: 150px;
        background-color: var(--bs-tertiary-bg, #f8f9fa);
        border: 1px solid var(--bs-border-color, #dee2e6);
        padding: 10px;
    }

}

.saldo {
    margin-bottom:2em;
    width:100%;
    td { vertical-align: text-top;}
}

.center {
    margin: 0 auto;
}

.date{
    white-space:nowrap;
}



#gavekort-cvc.valid {
    border-color: var(--bs-success, #198754);
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

#gavekort-cvc.invalid {
    border-color: var(--bs-danger, #dc3545);
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

#qrscan {
    width: 44px;
    height: 44px;
    background-image: url('../Images/qrbutton.png');
    background-size: cover;
    background-repeat: no-repeat;
    border: none;
    outline: none;
    background-color: transparent;
    display: inline-block;
    margin-top: 15px;
    cursor: pointer;
}


/* kassen (pi2): needed with or without the admin page layout, so it lives here, not in admin.css */
.gk-kasse .gk-lookup-input { flex: 1 1 16rem; font-weight: 600; letter-spacing: .04em; }
.gk-saldo { background: var(--bs-tertiary-bg, #f8f9fa); }
.gk-saldo-label { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color, #6c757d); }
.gk-saldo-value { font-size: 2.75rem; font-weight: 700; line-height: 1.1; color: var(--bs-secondary, #6c757d); font-variant-numeric: tabular-nums; }
.gk-saldo-currency { font-size: 1.25rem; font-weight: 600; }
.gk-segment .btn { min-height: 44px; }
.gk-kasse .gk-reader { max-width: 420px; }
.gk-amount { font-weight: 600; font-variant-numeric: tabular-nums; }

/* saldo lookup form: a card number does not need the full content width */
.saldoform { max-width: 480px; }
.saldoform #qrscan { margin-top: 0; flex: 0 0 auto; }

.usercardadmin{
    #reader {top: -200px;}
    .greybox{background-color: var(--bs-tertiary-bg, #f8f9fa);padding: 30px;margin-bottom: 30px;}
}
/* phones: the two admin boxes stack instead of sharing the width (pi1 show, pi2 kasse, pi4);
   wide content (saldo tables) scrolls inside its own box instead of spilling over the next one */
@media (max-width: 767.98px) {
    .cardadminpage { display: block; }
    .halfwide {
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        margin-bottom: 1em;
    }
    .halfwide label {
        display: block;
        width: auto;
        text-align: left;
    }
    .halfwide input:not([type="checkbox"]):not([type="radio"]),
    .halfwide textarea,
    .halfwide select { width: 100%; }
    /* ...except inside an input group (amount + "DKK"), where Bootstrap's flex sizing must win */
    .halfwide .input-group > input.form-control { width: 1%; flex: 1 1 auto; min-width: 0; }
    .halfwide input.button[type="submit"] { margin-left: 0; }
}

/* import pages: heading and intro stack (the .cardadminpage flex row put them side by side) */
.cardadminpage.importpage { display: block; }

.cardsvaluepage h1, .transactionspage h1, .eventlogpage h1 { margin-bottom: .75rem; }
/* the month the card list is filtered to */
table.months tr.table-active > * { font-weight: 600; }
/* Bootstrap paints the striping/active background as an inset box-shadow: keep it next to the red bar */
table.months tr.table-active > :first-child {
    box-shadow: inset 4px 0 0 var(--bs-primary, #e2121c), inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
}

/* the chosen view ("Vis: Aktive/Udløbne/Alle") must stand out from the other buttons */
.cardsvaluepage .btn.active {
    background-color: var(--bs-primary, #e2121c);
    border-color: var(--bs-primary, #e2121c);
    color: #fff;
}
.transactionspage h2 { font-size: 1.4rem; margin-bottom: .75rem; }
td.number, th.number { text-align: right; white-space: nowrap; }

/* event log on phones: one card per event instead of a 7-column table */
@media (max-width: 767.98px) {
    table.eventlog thead { display: none; }
    table.eventlog tbody tr {
        display: block;
        padding: .5rem 0;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    }
    table.eventlog tbody td {
        display: block;
        border: 0;
        padding: .1rem .5rem;
    }
    table.eventlog tbody td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
    }
    table.eventlog tbody td:empty { display: none; }
    table.eventlog tbody td.message::before { display: block; }
}

/* receipt web page: the A4 preview scrolls on narrow screens instead of being cut off */
.a4scroll { overflow-x: auto; padding: .5cm 0; }
@media print { .a4scroll { overflow: visible; padding: 0; } }

/* keep Bootstrap input groups (amount + "DKK") on one line: the site's legacy fileadmin
   gavekort.css forces width:100% !important on every text/number input in the plugins */
/* :not(#_) adds ID specificity: the legacy text-input rule carries :not(#amount) and would win otherwise */
div[class*='tx-idefagavekort'] .input-group > .form-control:not(#_) {
    width: 1% !important;
    flex: 1 1 auto;
}

/* purchase form: mark only what is wrong, no green "valid" ticks on optional fields */
.gavekort-purchase .was-validated .form-control:valid,
.gavekort-purchase .was-validated .form-select:valid {
    border-color: var(--bs-border-color);
    background-image: none;
    padding-right: .75rem;
}
.gavekort-purchase .was-validated .form-select:valid {
    background-image: var(--bs-form-select-bg-img);
    padding-right: 2.25rem;
}
.gavekort-purchase .was-validated .form-check-input:valid { border-color: var(--bs-border-color); }
.gavekort-purchase .was-validated .form-check-input:valid ~ .form-check-label { color: inherit; }

/* import forms: stacked Bootstrap blocks instead of the 25/75 label-input columns of .halfwide */
.halfwide.importform label { width: auto; text-align: left; margin-top: 0; }
.halfwide.importform input, .halfwide.importform select { width: 100%; margin-top: 0; }
.halfwide.importform input[type="submit"] { width: auto; margin-left: 0; }

/* overview (pi4): horizontal bar per expiry month, the current month highlighted */
.gk-barcol { width: 35%; min-width: 6rem; }
.gk-bar { height: .5rem; border-radius: 999px; background: var(--bs-secondary-bg, #e9ecef); overflow: hidden; }
.gk-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--bs-secondary, #6c757d); }
.gk-bar > span.gk-bar-current { background: var(--bs-warning, #ffc107); }

/* event log (eventlog plugin): one row per event */
.gk-events .gk-event { border-top: 1px solid var(--bs-border-color, #dee2e6); padding: .875rem 1.5rem; }
.gk-events .gk-event.unread { background: rgba(var(--bs-primary-rgb, 13, 110, 253), .05); }
.gk-events .gk-event-dot { flex: 0 0 .5rem; width: .5rem; height: .5rem; margin-top: .55rem; border-radius: 50%; background: transparent; }
.gk-events .gk-event.unread .gk-event-dot { background: var(--bs-primary, #0d6efd); }
.gk-events .gk-event-type { font-family: var(--bs-font-monospace); font-size: .75rem; }
.gk-events pre { max-height: 20rem; overflow: auto; font-size: .8125rem; background: var(--bs-tertiary-bg, #f8f9fa); padding: .75rem; border-radius: var(--bs-border-radius, .375rem); }

/* import (pi7): stepper and file drop zone */
.gk-stepper { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.gk-stepper li { display: flex; align-items: center; gap: .5rem; color: var(--bs-secondary-color, #6c757d); }
.gk-stepper .gk-step-no { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid currentColor; font-weight: 700; }
.gk-stepper li.active { color: var(--bs-body-color, #212529); font-weight: 600; }
.gk-stepper li.active .gk-step-no { background: var(--bs-secondary, #6c757d); border-color: var(--bs-secondary, #6c757d); color: #fff; }
.gk-stepper li.done .gk-step-no { background: var(--bs-success-bg-subtle, #d1e7dd); border-color: var(--bs-success, #198754); color: var(--bs-success, #198754); }
.gk-dropzone { position: relative; border: 2px dashed var(--bs-border-color, #dee2e6); border-radius: var(--bs-border-radius-lg, .5rem); padding: 2rem 1rem; text-align: center; background: var(--bs-tertiary-bg, #f8f9fa); }
.gk-dropzone.dragover, .gk-dropzone:focus-within { border-color: var(--bs-primary, #0d6efd); }
.gk-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* classic admin design: a wide saldo table scrolls inside its .halfwide box instead of running
   under the box next to it (on phones this was already the case, see the media query above) */
.halfwide { min-width: 0; overflow-x: auto; }

/* kassen on phones with a card loaded: a compact one-line lookup and a tighter page head, so the
   card's balance is in view without scrolling; the next card can still be looked up right away */
@media (max-width: 991.98px) {
    .gk-kasse-hascard .gk-pagehead { margin-bottom: .75rem !important; }
    /* !important: admin.css (loaded later) sets the page heading size with the same specificity */
    .gk-kasse-hascard .gk-pagehead h1 { font-size: 1.5rem !important; margin-bottom: 0 !important; }
    .gk-kasse-hascard .gk-pagehead-sub { display: none; }
    .gk-kasse-hascard .gk-lookup-card { margin-bottom: 1rem !important; }
    .gk-kasse-hascard .gk-lookup-card > .card-body { padding: .75rem; }
    .gk-kasse-hascard .gk-lookup .form-label {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
    }
    /* !important: the row carries Bootstrap's .flex-wrap utility, which is !important itself */
    .gk-kasse-hascard .gk-lookup .d-flex { flex-wrap: nowrap !important; }
    .gk-kasse-hascard .gk-lookup-input { flex: 1 1 auto; min-width: 0; font-size: 1rem; padding: .375rem .75rem; min-height: 44px; }
    .gk-kasse-hascard .gk-lookup .btn-lg { font-size: 1rem; padding: .375rem .75rem; min-height: 44px; white-space: nowrap; }
    .gk-kasse-hascard #gk-qrscan .gk-btn-text { display: none; }
}

/* paginations of the admin plugins (card list, event log, overview): the page buttons are <button>
   (they submit the filter form), the current page a <span> - same font, line height and padding for
   both, so the active one is not taller. Active page in the secondary colour with white text (the
   theme's link colour on the active background was red on navy). */
.gk-page .pagination .page-link {
    display: block;
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    padding: .375rem .75rem;
    margin: 0;
}
.gk-page .pagination .page-item.active .page-link {
    background-color: var(--bs-secondary, #6c757d);
    border-color: var(--bs-secondary, #6c757d);
    color: #fff;
}
