/* =====================================================
   Slideshow Gallery — shared styles (frontend + editor)
   ===================================================== */

/* Container */
.ssg-container {
    width: 100%;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
.ssg-container *,
.ssg-container *::before,
.ssg-container *::after {
    box-sizing: border-box;
}

/* Main slide */
.ssg-slide-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    overflow: hidden;
}
.ssg-slide-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Caption bar */
.ssg-caption-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    color: #000;
}
.ssg-caption-text {
    flex: 1;
    text-align: center;
    font-size: 14px;
}
.ssg-nav {
    cursor: pointer;
    color: #000;
    font-weight: bold;
    font-size: 40px;
    padding: 4px 12px;
    user-select: none;
    background: none;
    border: none;
    flex-shrink: 0;
    line-height: 1;
}
.ssg-nav:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* Thumbnail strip */
.ssg-thumb-strip-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ssg-thumb-scroll-btn {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 4px 8px;
    background: none;
    border: none;
    color: #000;
    flex-shrink: 0;
    user-select: none;
    line-height: 1;
}
.ssg-thumb-scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}
.ssg-thumb-scroll-btn:disabled {
    opacity: 0.2;
    cursor: default;
    background: none;
}
.ssg-thumb-row {
    display: flex;
    gap: 4px;
    flex: 1;
    overflow: hidden;
}
.ssg-thumb-col {
    flex: 1;
    min-width: 0;
}
.ssg-thumb-col img {
    width: 100%;
    display: block;
}
.ssg-demo { opacity: 0.6; }
.ssg-cursor { cursor: pointer; }
.ssg-active,
.ssg-demo:hover { opacity: 1; }

/* =====================================================
   Editor-only styles
   ===================================================== */
.ssg-editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8f8f8;
    border: 2px dashed #ccc;
    border-radius: 4px;
    text-align: center;
    color: #888;
}
.ssg-editor-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: #555;
}
.ssg-editor-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: #f0f0f0;
    border-radius: 4px;
}
.ssg-editor-thumb {
    position: relative;
    width: calc(14.28% - 8px);
    min-width: 60px;
}
.ssg-editor-thumb img {
    width: 100%;
    display: block;
    border-radius: 2px;
}
.ssg-editor-thumb-caption {
    display: block;
    font-size: 10px;
    color: #444;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
