/* Banko Plader til Print (A4) Stylesheet */

.print-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.print-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.print-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.button-container {
    display: flex;
    gap: 12px;
}

.btn-generate {
    background-color: var(--color-primary, #2563eb);
    color: white;
    padding: 10px 20px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.2s;
}

.btn-generate:hover {
    background-color: var(--color-primary-hover, #1d4ed8);
}

.btn-print {
    background-color: var(--color-secondary, #10b981);
    color: white;
    padding: 10px 20px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.2s;
}

.btn-print:hover {
    background-color: var(--color-secondary-hover, #059669);
}

/* SHEETS CONTAINER */
.sheets-container {
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* BANKO CARD */
.banko-card {
    background-color: #fff;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}

/* ROW */
.banko-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    height: 96px;
}

.banko-row:last-child {
    margin-bottom: 0;
}

/* CELLS */
.banko-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fff;
    overflow: hidden;
    position: relative;
    user-select: none;
}

.banko-cell.empty {
    background-color: #fff;
}

.toggle-words-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    user-select: none;
    cursor: pointer;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.toggle-words-container input[type=checkbox] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary, #2563eb);
}

.banko-cell img {
    width: 100%;
    height: 75%;
    object-fit: contain;
    display: block;
}

.banko-number {
    font-size: 16px;
    font-weight: 800;
    color: #2563eb;
    line-height: 1.2;
}

/* Hidden by default */
.banko-name {
    display: none;
    font-size: 8px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95%;
}

/* Shown only when .show-words is active */
.show-words .banko-cell img {
    height: 60%;
}

.show-words .banko-number {
    font-size: 14px;
    line-height: 1.05;
}

.show-words .banko-name {
    display: block;
}

/* PRINT STYLING (A4 PORTRAIT) */
@media print {
    @page {
        size: A4 portrait;
        margin: 5mm;
    }

    body {
        background-color: white !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .app-nav,
    .print-header-controls,
    .button-container,
    .app-footer {
        display: none !important;
    }

    .print-page-wrapper {
        padding: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    .sheets-container {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        gap: 8mm !important;
    }

    .banko-card {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        page-break-inside: avoid !important;
        margin-bottom: 7mm !important;
    }

    .banko-row {
        height: 94px !important;
    }

    .banko-cell.empty {
        background-color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
