/* Professional ID Card Design & Print System */

.cloudi7-icg-preview-container {
    max-width: 900px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* Card Display Grid */
.cloudi7-icg-card-display-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Reduced vertical gap */
    width: 100%;
}

/* Base Card Styling */
.cloudi7-icg-card.modern {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    position: relative;
    border: none;
    display: flex;
    flex-direction: column;
}

/* Horizontal Size */
.cloudi7-icg-card.horizontal {
    width: 350px;
    height: 220px;
}

/* Vertical Size */
.cloudi7-icg-card.vertical {
    width: 220px;
    height: 350px;
}

/* Header Redesign */
.cloudi7-icg-card-zone-header {
    height: 60px;
    background: linear-gradient(135deg, #1e73be, #0b4c7a);
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #ffffff;
}

.cloudi7-icg-header-logo {
    height: 40px !important;
    width: auto !important;
    object-fit: contain;
    margin-right: 15px;
}

.cloudi7-icg-header-org-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Body Styling */
.cloudi7-icg-card-zone-body {
    flex: 1;
    padding: 15px;
    display: flex;
    gap: 15px;
}

.cloudi7-icg-body-left {
    flex-shrink: 0;
}

.cloudi7-icg-user-photo-wrap {
    width: 90px;
    height: 110px;
    overflow: hidden;
    border-radius: 8px;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.cloudi7-icg-user-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cloudi7-icg-body-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.cloudi7-icg-user-name {
    margin: 0 0 2px 0;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    line-height: 1.1;
}

.cloudi7-icg-id-badge {
    font-size: 12px;
    font-weight: 700;
    color: #1e73be;
    margin-bottom: 5px;
}

.cloudi7-icg-dynamic-list {
    font-size: 13px;
    color: #444;
    line-height: 1.3;
}

.cloudi7-icg-dynamic-item label {
    font-weight: 600;
    color: #666;
}

/* QR Code Block */
.cloudi7-icg-card-qr-wrap {
    position: absolute;
    bottom: 35px;
    right: 15px;
    text-align: center;
}

.cloudi7-icg-qr-code {
    width: 45px;
    height: 45px;
    display: block;
    margin: 0 auto;
}

.cloudi7-icg-qr-label {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    margin-top: 2px;
    display: block;
}

/* Footer / Verification Text */
.cloudi7-icg-card-zone-footer {
    height: 25px;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.cloudi7-icg-card-zone-footer p {
    margin: 0;
    font-size: 11px;
    color: #666;
}

/* Back Side Specifics */
.cloudi7-icg-card-back .cloudi7-icg-card-zone-header {
    justify-content: center;
}

.cloudi7-icg-card-back .cloudi7-icg-header-org-name {
    text-align: center;
    margin-right: 0;
}

.cloudi7-icg-card-back .cloudi7-icg-card-zone-body {
    display: block;
    text-align: center;
    padding: 20px;
}

.cloudi7-icg-back-contact-info {
    font-size: 11px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.cloudi7-icg-terms-section {
    text-align: left;
    border-top: 1px dashed #ddd;
    padding-top: 10px;
}

.cloudi7-icg-terms-section h4 {
    font-size: 11px;
    margin: 0 0 5px 0;
    color: #333;
    text-transform: uppercase;
}

.cloudi7-icg-terms-list {
    font-size: 9px;
    color: #777;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Vertical Adjustments */
.cloudi7-icg-card.vertical .cloudi7-icg-card-zone-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cloudi7-icg-card.vertical .cloudi7-icg-body-right {
    text-align: center;
}

.cloudi7-icg-card.vertical .cloudi7-icg-card-qr-wrap {
    position: static;
    margin-top: 5px;
}

/* Print Logic */
@media print {
    body * {
        display: none !important;
    }
    
    .card-print-area,
    .card-print-area * {
        display: flex !important;
    }

    /* Override flex for specific elements that shouldn't be flex */
    .card-print-area .cloudi7-icg-card.modern * {
        display: block !important;
    }

    .card-print-area .cloudi7-icg-card-zone-header,
    .card-print-area .cloudi7-icg-card-zone-body,
    .card-print-area .cloudi7-icg-card-zone-footer {
        display: flex !important;
    }

    .card-print-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .cloudi7-icg-card.modern {
        box-shadow: none !important;
        border: 1px solid #eee !important;
        page-break-inside: avoid;
        margin-bottom: 30px !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
