/* ==================================================
   GS Presentation — Front-end Styles  v1.4.0
   ================================================== */

/* ---------- Wrapper ---------- */
.gsp-presentation-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: transparent;
    border-radius: 4px;
    box-sizing: border-box;
}

/* ---------- 16:9 (height=auto) ---------- */
.gsp-presentation-wrap.gsp-ratio {
    /*
     * Google Slides embed має:
     *   ~40px — верхній тулбар (прихований через top:-40px)
     *   ~52px — нижній бренд-бар (max з вимірів 1000×747, 1440×900, 1200×675 + 4px запас)
     * Контейнер = 16:9, iframe зміщуємо top:-40px,
     * висота = 100% + 40(верх) + 52(низ) = +92px → overflow:hidden обрізає зайве.
     */
    height: 0;
    padding-bottom: 56.25%;
}

/* ---------- iframe ---------- */
.gsp-presentation-wrap .gsp-iframe {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: calc(100% + 92px);
    border: none;
    display: block;
}

.gsp-presentation-wrap:not(.gsp-ratio) .gsp-iframe {
    top: -40px;
    height: calc(100% + 92px);
}

/* ---------- Navigation arrows ---------- */
.gsp-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    /* Колір задається CSS-змінними (перевизначаються inline style) */
    background: var(--gsp-arrow-bg, rgba(0,0,0,.50));
    border: 2px solid rgba(255,255,255,.25);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 11px;
    box-sizing: border-box;
    opacity: 0.85;
    transition: opacity .2s, background .2s, border-color .2s, transform .15s;
    outline: none;
}

.gsp-nav-btn:hover {
    opacity: 1;
    background: var(--gsp-arrow-hover-bg, rgba(26,115,232,.90));
    border-color: rgba(255,255,255,.6);
}

.gsp-nav-btn:active,
.gsp-nav-btn.gsp-btn-active {
    transform: translateY(-50%) scale(.88);
    background: var(--gsp-arrow-hover-bg, rgba(26,115,232,1));
    opacity: 1;
}

.gsp-nav-btn:disabled,
.gsp-nav-btn.gsp-disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.gsp-prev { left: 14px; }
.gsp-next { right: 14px; }

.gsp-nav-btn svg {
    width: 100%;
    height: 100%;
    stroke: var(--gsp-arrow-color, #ffffff);
    display: block;
    flex-shrink: 0;
}

.gsp-nav-btn:hover svg {
    stroke: var(--gsp-arrow-hover-color, #ffffff);
}

/* ---------- Pagination bar (знизу, ПОЗАконтейнером wrap) ---------- */
.gsp-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 6px;
}

.gsp-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gsp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,.20);
    cursor: pointer;
    transition: background .2s, transform .2s;
    border: none;
    padding: 0;
    outline: none;
    flex-shrink: 0;
}

.gsp-dot:hover {
    background: rgba(0,0,0,.45);
    transform: scale(1.25);
}

.gsp-dot.gsp-dot-active {
    background: var(--gsp-dot-active, #6a1aff);
    transform: scale(1.3);
}

.gsp-page-counter {
    font-size: 13px;
    color: #888;
    font-family: sans-serif;
    line-height: 1;
    min-width: 40px;
    white-space: nowrap;
}

/* ---------- Slide counter (всередині wrap, правий нижній кут) ---------- */
.gsp-slide-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    z-index: 20;
    font-size: 12px;
    font-family: sans-serif;
    line-height: 1;
    color: rgba(255,255,255,.75);
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s;
}

.gsp-presentation-wrap:hover .gsp-slide-counter {
    opacity: 1;
}

/* ---------- Fullscreen button ---------- */
.gsp-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    background: var(--gsp-fs-bg, rgba(0,0,0,.45));
    border: none;
    border-radius: 6px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .25s, background .2s;
    padding: 8px;
    box-sizing: border-box;
    outline: none;
}

.gsp-presentation-wrap:hover .gsp-fullscreen-btn {
    opacity: 1;
}

.gsp-fullscreen-btn svg {
    width: 100%;
    height: 100%;
    stroke: var(--gsp-fs-color, #ffffff);
    display: block;
}

.gsp-fullscreen-btn:hover {
    background: var(--gsp-fs-hover-bg, rgba(26,115,232,.85));
}

.gsp-fullscreen-btn:hover svg {
    stroke: var(--gsp-fs-hover-color, #ffffff);
}

/* ---------- Fullscreen state ---------- */
.gsp-presentation-wrap:fullscreen,
.gsp-presentation-wrap:-webkit-full-screen,
.gsp-presentation-wrap:-moz-full-screen,
.gsp-presentation-wrap:-ms-fullscreen {
    width: 100vw  !important;
    height: 100vh !important;
    padding-bottom: 0 !important;
    border-radius: 0;
    background: #000;
}

.gsp-presentation-wrap:fullscreen .gsp-iframe,
.gsp-presentation-wrap:-webkit-full-screen .gsp-iframe,
.gsp-presentation-wrap:-moz-full-screen .gsp-iframe,
.gsp-presentation-wrap:-ms-fullscreen .gsp-iframe {
    top: -40px;
    height: calc(100vh + 92px);
}

/* У повноекранному режимі пагінація всередині wrap */
.gsp-presentation-wrap:fullscreen .gsp-pagination-bar,
.gsp-presentation-wrap:-webkit-full-screen .gsp-pagination-bar,
.gsp-presentation-wrap:-moz-full-screen .gsp-pagination-bar,
.gsp-presentation-wrap:-ms-fullscreen .gsp-pagination-bar {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.40);
    border-radius: 20px;
    padding: 6px 14px;
    z-index: 20;
}

/* ---------- Error ---------- */
.gsp-error {
    color: #c0392b;
    background: #fde;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .gsp-nav-btn {
        width: 38px;
        height: 38px;
        padding: 9px;
    }
    .gsp-prev { left: 6px; }
    .gsp-next { right: 6px; }

    .gsp-dot {
        width: 7px;
        height: 7px;
    }
}
