.fluent-flipbook-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background: #f0f0f0;
    /* Default background for flipbook area */
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fluent-flipbook-container {
    width: 100%;
    height: 100%;
    position: relative;
    /* PageFlip will override styles */
}

/* Loading Overlay */
.fluent-flipbook-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    font-size: 16px;
    color: #666;
    font-family: sans-serif;
}

/* Controls (Prev/Next) */
.fluent-flipbook-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

    /* Mobile Responsive Fixes */
    max-width: 95%;
    /* Prevent overflowing screen width */
    width: auto;
    white-space: nowrap;
    /* Keep buttons on one line */
    justify-content: center;
}

.fluent-flipbook-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    padding: 5px;
    display: flex;
    align-items: center;
    /* Vertical align icon and text */
}

/* Hide text labels on very small screens, show icon only */
@media (max-width: 400px) {
    .fluent-flipbook-controls button {
        font-size: 16px;
    }

    .fluent-flipbook-controls {
        gap: 5px;
        padding: 5px 10px;
    }
}

.fluent-flipbook-controls .page-count {
    font-size: 12px;
    color: #555;
    font-weight: bold;
    white-space: nowrap;
}

/* Page Style (generic fallback) */
.fluent-flipbook-container .page {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    background-color: white;
    /* Ensure pages are white */
}

/* Fullscreen Styles */
.fluent-flipbook-wrapper:fullscreen {
    background-color: #333;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    height: 100% !important;
}

.fluent-flipbook-wrapper:fullscreen .fluent-flipbook-container {
    height: 90vh !important;
    /* Adjust height in fullscreen */
    width: 100% !important;
}

.fluent-flipbook-wrapper:fullscreen .fluent-flipbook-controls {
    bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
}

.fullscreen-btn {
    font-weight: bold;
}