/* ==========================================================================
   Shortcode Embeds - Inline content embeds rendered from shortcodes
   ========================================================================== */

/* Wrapper */
.shortcode-embed {
    clear: both;
}

.shortcode-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color, #212529);
}

/* ==========================================================================
   Gallery Shortcode
   ========================================================================== */
.shortcode-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm, 6px);
    aspect-ratio: 4/3;
}

.shortcode-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shortcode-gallery-item:hover img {
    transform: scale(1.05);
}

.shortcode-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shortcode-gallery-item:hover .shortcode-gallery-overlay {
    opacity: 1;
}

.shortcode-gallery-overlay i {
    font-size: 2rem;
    color: #fff;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.sc-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scLbFadeIn 0.2s ease;
}

@keyframes scLbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sc-lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.sc-lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: opacity 0.2s;
}

.sc-lightbox-close:hover {
    opacity: 0.7;
}

.sc-lightbox-prev,
.sc-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    transition: opacity 0.2s;
}

.sc-lightbox-prev:hover,
.sc-lightbox-next:hover {
    opacity: 0.7;
}

.sc-lightbox-prev {
    left: 15px;
}

.sc-lightbox-next {
    right: 15px;
}

.sc-lightbox-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ==========================================================================
   Reference Shortcode
   ========================================================================== */
.shortcode-reference-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: var(--white, #fff);
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: var(--radius-sm, 6px);
    min-height: 80px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.shortcode-reference-item:hover {
    border-color: var(--primary, #0d6efd);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shortcode-reference-item img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.shortcode-reference-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

a.shortcode-reference-item {
    text-decoration: none;
}
