
/* Digital Magazine Reader */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #030914;
}

.digital-magazine-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #020711, #07182e, #030914);
    color: #fff;
    box-sizing: border-box;
}

.digital-magazine-reader {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main viewport */
#flipbookContainer {
    position: relative;
    width: 100%;
    height: calc(100vh - 20px);
    min-height: 520px;
    margin: 0;
    padding: 10px 70px 55px;
    box-sizing: border-box;
    background: transparent;
}

/* Center the flipbook wrapper */
#flipbookWrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Give the book a centered, bounded area */
#flipbookSizer {
    position: relative;
    width: min(1180px, 100%);
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Flipbook library mount point */
#flipbookViewer {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    box-sizing: border-box;
}

#flipbookViewer canvas,
#flipbookViewer img {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Previous / next arrows */
.flipbook-edge-arrow {
    position: absolute;
    top: 50%;
    z-index: 90;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #101a2a;
    cursor: pointer;
}

.flipbook-edge-arrow-left {
    left: 12px;
}

.flipbook-edge-arrow-right {
    right: 12px;
}

.flipbook-edge-arrow.is-hidden {
    display: none;
}

/* Bottom toolbar */
#flipbookNav {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    transform: translateX(-50%);
    color: #fff;
    background: #101a2a;
    border-radius: 10px;
}

#flipbookNav button {
    min-width: 34px;
    height: 34px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

#flipPageIndicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 55px;
    color: #fff;
}

/* Loading */
#flipbookStatus {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
}

.flipbook-loader {
    width: 26px;
    height: 26px;
    border: 3px solid #344054;
    border-top-color: #4aa3ff;
    border-radius: 50%;
    animation: reader-spin .8s linear infinite;
}

@keyframes reader-spin {
    to { transform: rotate(360deg); }
}

/* Fullscreen */
#flipbookContainer:fullscreen,
#flipbookContainer:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    padding: 10px 70px 55px;
    background: #030914;
    box-sizing: border-box;
}

/* Mobile */
@media (max-width: 600px) {
    #flipbookContainer {
        height: 100dvh;
        min-height: 360px;
        padding: 8px 38px 50px;
    }

    #flipbookSizer {
        width: 100%;
    }

    .flipbook-edge-arrow {
        width: 32px;
        height: 32px;
    }

    .flipbook-edge-arrow-left {
        left: 3px;
    }

    .flipbook-edge-arrow-right {
        right: 3px;
    }

    #flipbookNav {
        max-width: calc(100vw - 12px);
        bottom: 6px;
        gap: 2px;
    }

    #flipbookNav button {
        min-width: 30px;
        height: 32px;
    }
}


/* Magazine breadcrumb */
.magazine-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    margin: 0;
    box-sizing: border-box;
    color: #aabbd1;
    background: transparent;
    font-size: 13px;
    line-height: 1.6;
}

.magazine-breadcrumb a {
    color: #c4d8f3;
    text-decoration: none;
}

.magazine-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.magazine-breadcrumb > span[aria-hidden="true"] {
    color: #64748b;
}

.magazine-breadcrumb .breadcrumb-current {
    color: #ffffff;
    font-weight: 600;
}

@media (max-width: 600px) {
    .magazine-breadcrumb {
        justify-content: flex-start;
        gap: 6px;
        padding: 10px 12px;
        font-size: 11px;
    }
}
