/* Easy FlipBook Secure Pro - Production Styles */
.efb-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
}

.efb-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    position: relative;
    text-align: center;
}

.efb-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.6em;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.efb-user-watermark {
    font-size: 0.9em;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

.efb-container {
    position: relative;
    background: #fafbfc;
    min-height: 600px;
	overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.efb-canvas {
    width: 100%;
    height: 1000px;
    background: white;
    border-radius: 0 0 16px 16px;
	overflow: hidden;
}

.efb-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 40px 60px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.5);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    font-size: 16px;
    color: #555;
    z-index: 100;
    min-width: 200px;
}

.efb-loading::before {
    content: "🔄";
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.efb-error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 40px;
    text-align: center;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 500;
    margin: 20px 0;
}

.efb-error::before {
    content: "⚠️";
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .efb-wrapper {
        margin: 15px;
        border-radius: 12px;
    }
    .efb-canvas {
        height: 550px;
    }
    .efb-header {
        padding: 20px;
    }
    .efb-header h3 {
        font-size: 1.3em;
    }
    .efb-loading {
        padding: 30px 40px;
        font-size: 15px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .efb-canvas {
        height: 450px;
    }
}

/* Admin Styles */
.efb-shortcode-box {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 20px;
    margin-top: 20px;
    border-radius: 0 8px 8px 0;
}

.efb-shortcode-box code {
    background: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #e1e5e9;
    word-break: break-all;
}
/* zoom */
/* Wrapper + header already exist */

/* STICKY TOOLBAR (independent of zoom) */
.efb-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f5f7fb;
    border-bottom: 1px solid #e1e5f0;
    font-size: 13px;
}

.efb-toolbar-left,
.efb-toolbar-center,
.efb-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.efb-toolbar-left {
    margin-right: auto;
    color: #556;
    font-weight: 500;
}

.efb-toolbar-right {
    margin-left: auto;
}

/* Existing zoom button styles retained */
.efb-zoom-btn {
    border: none;
    background: #1b75d0;
    color: #fff;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
}

.efb-zoom-btn:hover {
    background: #145ba5;
}

.efb-zoom-level {
    min-width: 48px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

/* Single / Book mode buttons */
.efb-mode-btn {
    border: 1px solid #d0d5e5;
    background: #ffffff;
    color: #445;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
}

.efb-mode-btn.active {
    background: #1b75d0;
    color: #fff;
    border-color: #1b75d0;
}

/* Flipbook viewport – clip zoom inside this area */
.efb-container {
    position: relative;
    background: #fafbfc;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.efb-canvas {
    width: 100%;
    height: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden; /* ensures zoomed pages don't escape */
}

/* Inner StPageFlip wrapper – the element we scale */
.efb-canvas .stf__wrapper {
    margin: 0 auto;
    will-change: transform;
}
.efb-nav-btn {
    border: none;
    background: #e2e7f2;
    color: #333;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.efb-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}