/* Design Legitimație - Model "Puterea Poporului" */
.mpd-id-card-modern {
    background-color: #004a99; /* Albastru mai deschis pentru contrast logo */
    background-image: none;
    border-radius: 10px;
    padding: 15px;
    color: white;
    font-family: 'Arial', sans-serif;
    position: relative;
    overflow: hidden;
    aspect-ratio: 85.6/53.98; /* Standard ID Card Ratio */
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #003366;
    
    /* Responsive Limits */
    max-width: 400px;
    width: 100%;
    margin: 0 auto; /* Center on mobile/tablet */
    
    /* Container Query for Font Scaling */
    container-type: inline-size;
}

/* Watermark Fundal - Eliminat */
.mpd-id-card-modern::before {
    display: none;
}

/* Header */
.mpd-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    gap: 10px;
    padding-left: 8px; /* Mutat logo mai la dreapta */
}

.mpd-card-logo-img {
    width: 40px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.mpd-card-header-text {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mpd-card-title-text {
    font-size: 11px; /* Micșorat */
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    white-space: nowrap;
}

.mpd-card-id-text {
    font-size: 8px; /* Micșorat text galben */
    font-weight: bold;
    color: #FFD700; /* Galben */
    text-transform: uppercase;
    display: block;
    white-space: nowrap;
}

.mpd-card-separator {
    border-bottom: 1px solid rgba(255,255,255,0.4);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* Body */
.mpd-card-body {
    display: flex;
    flex: 1;
    gap: 12px;
    position: relative;
    z-index: 1;
    align-items: flex-start;
    padding-top: 8px; /* Coborât conținutul */
}

.mpd-card-photo-box {
    width: 75px; /* Pătrat */
    height: 75px; /* Pătrat */
    border: 2px solid white;
    overflow: hidden;
    flex-shrink: 0;
    background: #ccc;
    border-radius: 2px;
}

.mpd-card-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mpd-card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: flex-start;
    padding-top: 0;
    min-width: 0; /* Prevent flex overflow */
}

.mpd-card-name {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mpd-card-name-separator {
    border-bottom: 1px dotted rgba(255,255,255,0.5);
    margin-bottom: 8px;
    width: 100%;
}

.mpd-card-role-box {
    background-color: transparent; /* Transparent conform cerinței */
    color: white;
    padding: 2px 0;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    display: inline-block;
    margin-bottom: 6px;
    width: fit-content;
}

.mpd-card-info-row {
    font-size: 10px;
    margin-bottom: 3px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mpd-card-info-row strong {
    font-weight: normal;
    opacity: 0.7;
    margin-right: 2px;
}

/* Footer / QR */
.mpd-card-footer {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
}

.mpd-card-qr-code {
    width: 45px;
    height: 45px;
    background: white;
    padding: 2px;
    border-radius: 2px;
}

.mpd-card-qr-text {
    display: none;
}

/* Background Pattern - Subtle Overlay */
.mpd-id-card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 0;
}

/* Header Row */
.mpd-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.mpd-card-logo {
    height: 25px;
    width: auto;
    max-width: 120px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    object-fit: contain;
}

.mpd-card-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    font-weight: 600;
}

/* Content Row */
.mpd-card-content-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.mpd-card-photo-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.mpd-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mpd-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevent flex overflow */
}

.mpd-card-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.mpd-card-role {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 2px;
    font-weight: 500;
}

.mpd-card-branch {
    font-size: 10px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.mpd-card-id {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.2);
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
    align-self: flex-start;
}

/* QR Code */
.mpd-card-qr {
    width: 45px;
    height: 45px;
    background: white;
    padding: 2px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Footer Row */
.mpd-card-footer-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.mpd-card-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    letter-spacing: 1px;
}

.mpd-card-status.active {
    background: #28a745;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive Font Sizes based on Container Width - MOVED TO BOTTOM FOR PRIORITY */
@container (max-width: 480px) {
    .mpd-card-title-text { font-size: 10px !important; }
    .mpd-card-id-text { font-size: 7px !important; }
    .mpd-card-name { font-size: 13px !important; margin-bottom: 3px !important; }
    .mpd-card-role-box { font-size: 10px !important; margin-bottom: 4px !important; }
    .mpd-card-info-row { font-size: 9px !important; margin-bottom: 2px !important; }
    .mpd-card-photo-box { width: 68px !important; height: 68px !important; }
    .mpd-card-qr-code { width: 40px !important; height: 40px !important; }
    .mpd-card-details { padding-right: 45px !important; }
}

/* Fallback for browsers without container queries (Media Query) */
@media (max-width: 480px) {
    .mpd-card-title-text { font-size: 10px !important; }
    .mpd-card-id-text { font-size: 7px !important; }
    .mpd-card-name { font-size: 13px !important; margin-bottom: 3px !important; }
    .mpd-card-role-box { font-size: 10px !important; margin-bottom: 4px !important; }
    .mpd-card-info-row { font-size: 9px !important; margin-bottom: 2px !important; }
    .mpd-card-photo-box { width: 68px !important; height: 68px !important; }
    .mpd-card-qr-code { width: 40px !important; height: 40px !important; }
    .mpd-card-details { padding-right: 45px !important; }
}
