/* ===========================
   Social Feed Widget Styles
   (Instagram, YouTube, Pinterest)
   =========================== */

.ig-widget-section {
    margin: 40px 0;
}

.ig-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #333;
}

/* Barvy ikon podle zdroje */
.ig-title svg                    { color: #E1306C; } /* Instagram - default */
.ig-source-youtube  .ig-title svg,
section.ig-widget-section--youtube .ig-title svg  { color: #FF0000; }
.ig-source-pinterest .ig-title svg,
section.ig-widget-section--pinterest .ig-title svg { color: #E60023; }

/* Badge ikony v rohu dlazdice */
.ig-source-badge {
    position: absolute;
    bottom: 6px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    pointer-events: none;
}

.ig-source-badge svg { width: 16px; height: 16px; }

/* Další barvy badge – YouTube */
.ig-source-youtube .ig-source-badge  { background: rgba(255,0,0,0.75); }
/* Pinterest */
.ig-source-pinterest .ig-source-badge { background: rgba(230,0,35,0.75); }

/* Dlazdice */
.ig-tile .tile-pan.ig-tile-link {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.ig-tile .tile-pan.ig-tile-link:hover {
    transform: scale(1.03);
    filter: brightness(0.85);
}

.ig-meta {
    font-size: 0.8rem;
    color: #666;
    margin: 4px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===========================
   Lightbox
   =========================== */

.ig-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-lightbox-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
}

.ig-lightbox-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    max-width: 900px;
    width: 90%;
    display: flex;
    flex-direction: row;
    max-height: 90vh;
}

.ig-lightbox-box img {
    width: 60%;
    object-fit: cover;
    display: block;
    max-height: 90vh;
}

.ig-lightbox-info {
    padding: 24px;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

.ig-lightbox-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    z-index: 2;
    line-height: 1;
}

#ig-lightbox-caption {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    white-space: pre-line;
    flex-grow: 1;
    margin-bottom: 16px;
}

.ig-lightbox-stats {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 16px;
}

/* Tlačítko odkazu - barva podle zdroje */
.ig-open-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); /* Instagram default */
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    transition: opacity 0.2s;
}

.ig-open-btn:hover { opacity: 0.85; }

/* Barva tlačítka pro YouTube */
.ig-open-btn[data-source="youtube"] {
    background: #FF0000;
}

/* Barva tlačítka pro Pinterest */
.ig-open-btn[data-source="pinterest"] {
    background: #E60023;
}

.ig-empty {
    color: #999;
    font-style: italic;
    padding: 20px 0;
}

/* Mobilní verze */
@media (max-width: 640px) {
    .ig-lightbox-box {
        flex-direction: column;
    }
    .ig-lightbox-box img {
        width: 100%;
        max-height: 50vh;
    }
    .ig-lightbox-info {
        width: 100%;
        padding: 16px;
    }
}
