/* Base Issuu Container Shell */
.waaw-issuu-wrapper {
    position: relative;
    background-color: #222222;
    width: 100%;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #ffffff;
    user-select: none;
}

/* Fullscreen Mode Overrides */
.waaw-issuu-wrapper:fullscreen,
.waaw-issuu-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background-color: #1a1a1a !important;
    border-radius: 0 !important;
    padding: 0 !important;
    justify-content: space-between !important;
}

.waaw-issuu-wrapper:fullscreen .waaw-issuu-viewport,
.waaw-issuu-wrapper:-webkit-full-screen .waaw-issuu-viewport {
    height: calc(100vh - 50px) !important;
    max-height: calc(100vh - 50px) !important;
    padding: 10px 60px !important;
    box-sizing: border-box;
}

.waaw-issuu-wrapper:fullscreen .waaw-issuu-bar,
.waaw-issuu-wrapper:-webkit-full-screen .waaw-issuu-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 50px !important;
    z-index: 999999 !important;
    background: #111111 !important;
    border-top: 1px solid #333333 !important;
}

/* Viewport and Floating Navigation Arrows */
.waaw-issuu-viewport {
    position: relative;
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 60px;
    box-sizing: border-box;
    overflow: hidden;
}

.waaw-book-canvas {
    transition: transform 0.2s ease-out;
}

.waaw-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    font-size: 32px;
    width: 48px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, opacity 0.2s;
    border-radius: 4px;
}

.waaw-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.waaw-arrow-prev { left: 12px; }
.waaw-arrow-next { right: 12px; }

/* Issuu Bottom Floating Control Bar */
.waaw-issuu-bar {
    width: 100%;
    height: 48px;
    background: #181818;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    z-index: 20;
}

.waaw-bar-left, .waaw-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.waaw-bar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 35%;
}

.waaw-page-counter {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.waaw-brand-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888888;
    border-left: 1px solid #333333;
    padding-left: 12px;
}

/* Scrubbing Range Slider */
.waaw-page-slider {
    flex-grow: 1;
    accent-color: #ffffff;
    cursor: pointer;
    height: 3px;
}

.waaw-bar-icon {
    background: transparent;
    border: none;
    color: #cccccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.waaw-bar-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Thumbnail Grid Overlay Drawer */
.waaw-thumbs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

.waaw-thumbs-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.waaw-thumbs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #333333;
}

.waaw-thumbs-header h3 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.waaw-close-thumbs {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

.waaw-thumbs-grid {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.waaw-thumb-card {
    position: relative;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.waaw-thumb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.waaw-thumb-card canvas {
    width: 100%;
    display: block;
}

.waaw-thumb-num {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Page Canvas Styles */
.waaw-page-wrapper {
    background: #ffffff;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

.waaw-page-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.waaw-loading-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #777777;
    font-size: 13px;
}

.waaw-error {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
}