/* AdeptWiz WP PDF Embedder Front-End Viewer Styles */

.adeptwiz-pdf-container {
    position: relative;
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin: 16px 0;
    user-select: none;
    -webkit-user-select: none;
}

.adeptwiz-pdf-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 20;
}

.adeptwiz-pdf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: adeptwiz-spin 1s infinite linear;
    margin-bottom: 12px;
}

@keyframes adeptwiz-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.adeptwiz-pdf-viewer-stage {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: #334155;
    position: relative;
}

/* Two Page Book View Layout */
.adeptwiz-pdf-two-page-spread {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.adeptwiz-pdf-two-page-spread .adeptwiz-pdf-canvas-wrapper {
    margin-bottom: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.adeptwiz-pdf-canvas-wrapper {
    position: relative;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #ffffff;
}

.adeptwiz-pdf-canvas-wrapper canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}

/* Watermark Overlay on Canvas */
.adeptwiz-pdf-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.adeptwiz-pdf-watermark-content {
    position: absolute;
    font-weight: 800;
    white-space: nowrap;
    text-transform: uppercase;
    transform-origin: center center;
}

.adeptwiz-pdf-watermark-image {
    max-width: 60%;
    max-height: 60%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Navigation & Controls Toolbar */
.adeptwiz-pdf-toolbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 15;
    transition: opacity 0.3s ease;
}

.adeptwiz-pdf-toolbar-hover {
    opacity: 0.2;
}

.adeptwiz-pdf-container:hover .adeptwiz-pdf-toolbar-hover {
    opacity: 1;
}

.adeptwiz-pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.adeptwiz-pdf-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.adeptwiz-pdf-btn:hover {
    background: #0284c7;
}

.adeptwiz-pdf-page-num {
    width: 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-align: center;
    border-radius: 4px;
    padding: 4px;
    font-size: 13px;
}

.adeptwiz-pdf-page-count {
    font-size: 13px;
    color: #cbd5e1;
}

/* Text Protection Mask */
.adeptwiz-pdf-no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Fullscreen Overlay Mode */
.adeptwiz-pdf-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* Download Link Box */
.adeptwiz-pdf-download-link-box {
    text-align: center;
    padding: 8px;
    background: #0f172a;
}

.adeptwiz-pdf-download-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.adeptwiz-pdf-download-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Mobile Touch Adjustments */
@media (max-width: 768px) {
    .adeptwiz-pdf-toolbar {
        padding: 6px 10px;
    }
    .adeptwiz-pdf-btn {
        padding: 6px 8px;
    }
    .adeptwiz-pdf-page-num {
        width: 34px;
    }
}
