/* Soubor: media.css | Verze: 1.0 */
/* Popis: Styly pro profilové fotografie a obrázky v chatu. Modulární doplněk k hlavnímu style.css. */

/* --- AVATARY --- */
.avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--surface-highlight);
    border: 2px solid var(--border-color);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Velikosti pro různé kontexty */
.avatar-small { 
    width: 44px; 
    height: 44px; 
    /* Nahradí stávající .lb-rank-circle v žebříčku, pokud má uživatel fotku */
}

.avatar-medium { 
    width: 56px; 
    height: 56px; 
}

.avatar-large { 
    width: 110px; 
    height: 110px; 
    border-width: 3px; 
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

/* --- UPLOAD AVATARU (PROFIL) --- */
.avatar-upload-container {
    position: relative;
    cursor: pointer;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    width: max-content;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-upload-container:active { 
    transform: scale(0.92); 
}

.avatar-upload-overlay {
    position: absolute;
    bottom: 0;
    right: -5px;
    background: var(--primary-color);
    color: var(--bg-color);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 3px solid var(--surface-color);
    transition: background 0.2s;
}

/* --- OBRÁZKY V CHATU --- */
.chat-media-img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    margin-top: 8px;
    margin-bottom: 4px;
    display: block;
    object-fit: contain;
    background-color: rgba(0,0,0,0.4);
    cursor: zoom-in;
    border: 1px solid rgba(255,255,255,0.08);
    transition: opacity 0.3s;
}

.chat-media-img:active { 
    opacity: 0.8; 
}

/* --- TLAČÍTKO PRO NAHRÁNÍ V CHATU --- */
.msg-upload-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    outline: none;
    -webkit-appearance: none;
}

.msg-upload-btn:active {
    background: rgba(255,255,255,0.05);
    color: var(--primary-color);
    transform: scale(0.9);
}

/* Helper pro stávající input area v chatu */
.msg-input-area.with-media {
    padding-left: 8px;
}

/* --- SKRYTÝ INPUT PRO VÝBĚR SOUBORU --- */
.hidden-file-input {
    display: none !important;
}

/* Zarovnání avataru a jména v žebříčku */
.lb-user-header.with-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}
