﻿/* Student ID cards — India K-12. Include once (global stylesheet or index.html <link>). */

.idc-pair {
    display: inline-flex;
    gap: 16px;
    vertical-align: top;
}
/* always render exact colors */
.idc {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.idc {
    background: #fff;
    border: 1px solid #dcdfe4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    color: #212529;
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
}

.idc-portrait .idc {
    width: 320px;
    height: 500px;
}

.idc-landscape .idc {
    width: 500px;
    height: 320px;
}

/* header */
.idc-header {
    background: var(--idc-primary);
    color: #fff;
    text-align: center;
    padding: 15px 10px;
    border-bottom: 4px solid var(--idc-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.idc-landscape .idc-header {
    flex-direction: row;
    text-align: left;
    gap: 12px;
}

.idc-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--idc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

    .idc-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 50%;
    }

.idc-school-name {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: 14px;
}

.idc-school-addr {
    font-size: 10px;
    color: #e0e6ee;
}

/* front body */
.idc-front-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 22px;
    flex: 1;
}

.idc-landscape .idc-front-body {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
}

.idc-photo {
    width: 105px;
    height: 135px;
    margin: 18px 0 10px;
    border: 3px solid var(--idc-primary);
    border-radius: 6px;
    background: var(--idc-accent);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .idc-photo.rounded {
        border-radius: 50%;
        width: 120px;
        height: 120px;
    }

    .idc-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.idc-photo-ph {
    color: #adb5bd;
    font-size: 11px;
}

.idc-name {
    color: var(--idc-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
}

.idc-landscape .idc-front-body .idc-name {
    text-align: left;
}

.idc-rows {
    width: 100%;
}

.idc-row {
    display: flex;
    line-height: 1.4;
    font-size: 13px;
    margin-bottom: 5px;
}

.idc-lbl {
    color: #6c757d;
    font-weight: 500;
    width: 112px;
    flex-shrink: 0;
}

.idc-row b {
    color: #212529;
    font-weight: 600;
}

/* front accent band */
.idc-band {
    background: var(--idc-secondary);
    color: var(--idc-primary);
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* back */
.idc-band-top {
    background: var(--idc-primary);
    height: 12px;
}

.idc-back-body {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.idc-divider {
    height: 1px;
    background: #e9ecef;
    margin: 10px 0;
}

.idc-qr {
    width: 66px;
    height: 66px;
    margin: 12px auto 4px;
    align-self: center;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .idc-qr img, .idc-qr canvas {
        width: 100%;
        height: 100%;
    }

.idc-validity {
    text-align: center;
    font-size: 11px;
    color: #6c757d;
}

.idc-sign {
    display: flex;
    justify-content: space-between;
    padding: 0 14px;
    margin-top: auto;
    margin-bottom: 10px;
    gap: 14px;
}

    .idc-sign > div {
        text-align: center;
        flex: 1;
    }

.idc-sign-line {
    border-top: 1px dashed #adb5bd;
    height: 22px;
}

.idc-sign span {
    font-size: 9px;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
}

.idc-return {
    background: var(--idc-accent);
    border-top: 1px solid #e1e4e8;
    padding: 8px;
    text-align: center;
    font-size: 9px;
    color: #6c757d;
    line-height: 1.3;
}

/* print: only cards, no chrome */
@media print {
    body * {
        visibility: hidden;
    }

    .id-card-print-area, .id-card-print-area * {
        visibility: visible;
    }

    .id-card-print-area {
        position: absolute;
        inset: 0;
        padding: 8mm;
    }

        .id-card-print-area .idc {
            break-inside: avoid;
            box-shadow: none;
        }
            /* keep header / band / bg colors when printing (browser strips them otherwise) */
            .id-card-print-area .idc,
            .id-card-print-area .idc * {
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
                color-adjust: exact !important;
            }

    .no-print {
        display: none !important;
    }
}
