/* modules/sztp_card/card.css */
/* SZTP CARD RENDERER STYLES V1.1 - SCALE FIX */

:root {
    --card-ratio: 1.5858; /* ID-1 format exact ratio */
    --card-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    --card-header-bg: #0f172a;
    --card-header-text: #ffffff;
    --card-accent: #0d6efd;
    --card-font-main: 'Inter', sans-serif;
    --card-font-mono: 'Courier New', monospace;
}

/* Główny kontener karty */
.sztp-card-wrapper {
    /* KLUCZOWE: Definiujemy ten element jako kontener dla zapytań o rozmiar */
    container-type: inline-size;
    
    position: relative;
    width: 100%;
    /* Ograniczamy maksymalną szerokość, aby karta nie była "plakatem" na dużym ekranie */
    max-width: 420px; 
    margin: 0 auto; /* Centrowanie */
    
    aspect-ratio: var(--card-ratio);
    background: var(--card-bg-gradient);
    border-radius: 10px;
    overflow: hidden; /* Ucięcie wszystkiego co wystaje */
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    font-family: var(--card-font-main);
    color: #1e293b;
    user-select: none;
    border: 1px solid rgba(255,255,255,0.5);
    box-sizing: border-box;
    line-height: 1.2;
}

/* Tło/Wzór */
.sztp-card-bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.8) 0%, transparent 60%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 11px);
    z-index: 0;
    pointer-events: none;
}

/* Nagłówek */
.sztp-card-header {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 18%; /* Stała wysokość nagłówka */
    background: var(--card-header-bg);
    color: var(--card-header-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    z-index: 2;
    box-sizing: border-box;
}

.sztp-card-logo-sm {
    height: 75%; /* Logo dopasowane do wysokości nagłówka */
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.sztp-card-header-text {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sztp-header-main {
    font-size: 4cqw; /* Skalowanie względem szerokości karty */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 0.9;
}

.sztp-header-sub {
    font-size: 2cqw;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--card-accent);
    margin-top: 2px;
}

/* Ciało Karty */
.sztp-card-body {
    position: absolute;
    top: 18%; /* Zaczyna się pod nagłówkiem */
    left: 0;
    width: 100%;
    height: 82%; /* Reszta wysokości */
    padding: 4%;
    display: flex;
    gap: 4%;
    z-index: 2;
    box-sizing: border-box;
}

/* Lewa kolumna (Zdjęcie) */
.sztp-col-photo {
    width: 32%; /* Węższa kolumna zdjęcia */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2%;
}

.sztp-photo-frame {
    width: 100%;
    aspect-ratio: 3/4;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    margin-bottom: 8%;
}

.sztp-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sztp-dept-badge {
    width: 100%;
    text-align: center;
    background: var(--card-accent);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 2.5cqw;
    padding: 4px 0;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Prawa kolumna (Dane) */
.sztp-col-info {
    width: 64%; /* Szersza kolumna danych */
    display: flex;
    flex-direction: column;
    padding-top: 1%;
}

.sztp-info-group {
    margin-bottom: 3%;
    width: 100%;
}

.sztp-label {
    font-size: 1.8cqw;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1px;
    display: block;
    letter-spacing: 0.5px;
}

.sztp-value-rank {
    font-size: 2.8cqw; /* ZMNIEJSZONO */
    font-weight: 800;
    color: var(--card-accent);
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sztp-value-name {
    font-size: 4.2cqw; /* ZMNIEJSZONO */
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 2px;
    /* Obsługa długich nazwisk - zawijanie */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.sztp-value-id {
    font-family: var(--card-font-mono);
    font-size: 4.5cqw;
    font-weight: 700;
    color: #dc3545;
    letter-spacing: -0.5px;
}

/* Footer / Disclaimer */
.sztp-card-footer {
    margin-top: auto; /* Dopycha do dołu */
    text-align: right;
    width: 100%;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 4px;
}

.sztp-disclaimer {
    font-size: 1.4cqw;
    color: #64748b;
    line-height: 1.1;
    text-align: justify;
    text-align-last: right;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* WARSTWA HOLOGRAFICZNA */
.sztp-holo-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.3) 45%, rgba(255,255,255,0.0) 50%, transparent 100%);
    mix-blend-mode: overlay;
    z-index: 5;
    pointer-events: none;
    opacity: 0.5;
}

.sztp-holo-seal {
    position: absolute;
    bottom: 8%;
    right: 4%;
    width: 22%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    background: conic-gradient(from 180deg at 50% 50%, rgba(255,0,0,0.1), rgba(0,255,0,0.1), rgba(0,0,255,0.1), rgba(255,0,0,0.1));
    opacity: 0.3;
    z-index: 1;
    filter: blur(0.5px);
}