﻿
/* ============================================================
   CUSTOMER ID CARD
   English / Arabic
   Card: 320px x 500px
   ============================================================ */

.customer-id-print-card {
    width: 320px;
    height: 500px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    background: white;
    color: #111827;
    font-family: Arial, Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Photo */

.customer-id-photo {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 10px;
}

    .customer-id-photo img,
    .customer-id-photo-placeholder {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
    }

.customer-id-photo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e5e7eb;
    font-size: 12px;
}

/* Names */

.customer-id-names {
    text-align: center;
    flex-shrink: 0;
}

.customer-id-english-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.customer-id-arabic-name {
    font-size: 17px;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.4;
}

.customer-id-job-title {
    font-size: 13px;
    margin-top: 4px;
}

.customer-id-status {
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}

.customer-id-number {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin-top: 6px;
}

/* Divider */

.customer-id-print-card hr {
    width: 100%;
    border: 0;
    border-top: 1px solid #d1d5db;
    margin: 10px 0;
    flex-shrink: 0;
}

/* Employee details */

.customer-id-details {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

    .customer-id-details > div {
        margin-bottom: 5px;
    }




    .customer-id-details strong {
        font-weight: 700;
    }

/* Barcode */

.customer-id-barcode {
    margin-top: auto;
    padding-top: 8px;
    text-align: center;
    flex-shrink: 0;
}

    .customer-id-barcode svg {
        max-width: 100%;
        height: auto;
    }

/* Arabic */

.customer-id-print-card[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

    .customer-id-print-card[dir="rtl"] .customer-id-details {
        direction: rtl;
        text-align: right;
    }

/* English */

.customer-id-print-card[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

    .customer-id-print-card[dir="ltr"] .customer-id-details {
        direction: ltr;
        text-align: left;
    }

/* Always center these sections */

.customer-id-print-card .customer-id-names,
.customer-id-print-card .customer-id-barcode {
    text-align: center;
}

/* Hide the Blazor print area on the normal page.
   The dedicated print window overrides this rule. */

#customer-id-print-area {
    display: none;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {

    @page {
        size: auto;
        margin: 10mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
    }

    #customer-id-print-area {
        display: block !important;
        position: static !important;
        width: 320px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .customer-id-print-grid {
        display: block !important;
        width: 320px !important;
    }

    .customer-id-print-card {
        width: 320px !important;
        height: 500px !important;
        margin: 0 !important;
        box-shadow: none !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

     
}
