/**
 * PDF Smart Previewer Styles
 */

/* Main Container */
.pdf-smart-previewer-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* Loading Indicator */
.pdf-smart-previewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: transparent;
    border-radius: 8px;
    text-align: center;
}

.pdf-smart-previewer-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f8f9fa;
    border-top: 4px solid #f8f9fa99;
    border-radius: 50%;
    animation: pdf-smart-previewer-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes pdf-smart-previewer-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.pdf-smart-previewer-loading p {
    margin: 0;
    color: #f8f9fa;
    font-size: 16px;
    font-weight: 500;
}

/* Error Message */
.pdf-smart-previewer-error-msg {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.pdf-smart-previewer-error-msg p {
    margin: 0;
    font-size: 16px;
}

/* PDF Container */
.pdf-smart-previewer-container {
    position: relative;
    background: none;
    /* border: 1px solid #dee2e6;
    border-radius: 8px; */
    overflow: hidden;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    /* Remove fixed height - let content determine size */
    min-height: 400px;
    /* Minimum height for loading states */
}

/* Controls (now below viewer) */
.pdf-smart-previewer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    /* padding: 20px 0px; */
    background: rgba(0, 0, 0, 0);
    /* border-top: 1px solid #dee2e6; */
    /* Changed from border-bottom to border-top */
    /* margin-top: auto; */
    /* Push to bottom */
    flex-wrap: wrap;
}

.pdf-smart-previewer-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #0162fb;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.pdf-smart-previewer-nav-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-2px);
}

.pdf-smart-previewer-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.pdf-smart-previewer-page-counter {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.pdf-smart-previewer-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pdf-smart-previewer-fullscreen-btn:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* PDF Viewer */
.pdf-smart-previewer-viewer {
    position: relative;
    /* Remove fixed height - let content determine size */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* background: #f8f9fa; */
    overflow: visible;
    /* padding: 20px; */
    /* Add padding around the PDF */
    min-height: 300px;
    /* Minimum height for loading states */
}

/* Navigation overlay inside viewer - positioned on sides of document */
.pdf-smart-previewer-nav-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    z-index: 9;
    pointer-events: none;
    /* Allow clicks to pass through the overlay */
    width: 100%;
    /* Will be adjusted by JavaScript to match canvas width */
    justify-content: space-between;
    /* padding: 0 20px; */
    box-sizing: border-box;
}

.pdf-smart-previewer-nav-overlay .pdf-smart-previewer-nav-btn {
    pointer-events: auto;
    /* Re-enable clicks on buttons */
    padding: 12px 20px;
    background: rgba(0, 124, 186, 0.3);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); */
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* min-width: 50px; */
    /* height: 50px; */
}

.pdf-smart-previewer-nav-overlay .pdf-smart-previewer-nav-btn:hover:not(:disabled) {
    background: rgba(0, 90, 135, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pdf-smart-previewer-nav-overlay .pdf-smart-previewer-nav-btn:disabled {
    background: rgba(204, 204, 204, 0.7) !important;
    /* cursor: not-allowed; */
    cursor: default;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdf-smart-previewer-canvas {
    max-width: none;
    /* Remove width constraint */
    max-height: 100%;
    width: auto;
    /* Let canvas determine its own width */
    height: auto;
    /* Let canvas determine its own height */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    /* Center the canvas */
}

/* Lock Screen Overlay */
.pdf-smart-previewer-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    /* Default blur opacity */
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
    border-radius: 8px !important
}

body[class*="pdf-smart-previewer-fullscreen-overlay"] {
    overflow: hidden;
}

.pdf-smart-previewer-lock-content {
    position: relative;
    text-align: center;
    padding: 48px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 80%;
}

.pdf-smart-previewer-lock-message {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
    line-height: 1.5;
}

.pdf-smart-previewer-unlock-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #0162fb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-smart-previewer-unlock-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

/* Popup Modal */
.pdf-smart-previewer-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pdf-smart-previewer-popup-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    width: 600px;
    /* Default width, overridden by JS */
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pdf-smart-previewer-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.pdf-smart-previewer-popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.pdf-smart-previewer-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    /* background: #dc3545; */
    background: transparent;
    color: black !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pdf-smart-previewer-popup-close:hover {
    /* background: #c82333; */
    transform: scale(1.1);
    background: transparent;
}

.pdf-smart-previewer-popup-body {
    /* padding: 20px; */
    overflow-y: auto;
    max-height: calc(90vh - 70px);
    /* Adjust for header height */
}

/* Form Loading State */
.pdf-smart-previewer-form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.pdf-smart-previewer-form-loading::after {
    content: '';
    position: absolute;
    top: calc(50% - 20px);
    left: calc(50% - 20px);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0162fb;
    border-radius: 50%;
    animation: pdf-smart-previewer-spin 1s linear infinite;
}

/* Fullscreen Modal */
.pdf-smart-previewer-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pdf-smart-previewer-fullscreen-content {
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* 📱 Mobile view adjustments */
@media (max-width: 768px) {
    .pdf-smart-previewer-fullscreen-content {
        flex-direction: column-reverse;
        justify-content: flex-end;
        height: fit-content;
        position: relative;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .pdf-smart-previewer-fullscreen-content {
        width: 85%;
        height: 80%;
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: 8px;
        overflow: auto;
    }
}

.pdf-smart-previewer-fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

/* 📱 Mobile view adjustments */
@media (max-width: 768px) {
    .pdf-smart-previewer-fullscreen-header {
        position: unset;
    }
}

.pdf-smart-previewer-fullscreen-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pdf-smart-previewer-fullscreen-close {
    position: absolute;
    top: 15px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    color: #000 !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: none;
    /* padding: 0 !important; */
}

/* 📱 Mobile view adjustments */
@media (max-width: 768px) {
    .pdf-smart-previewer-fullscreen-close {
        padding: 0 !important;
        top: 0 !important;
        right: 0 !important;
    }
}

.pdf-smart-previewer-fullscreen-close:hover,
.pdf-smart-previewer-fullscreen-close:focus {
    background: none;
    color: #000;
    transform: none;
}

.pdf-smart-previewer-fullscreen-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f8f9fa;
    overflow: auto;
    margin: 40px 0;
    /* Enable smooth scrolling for better mobile experience */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Mobile fullscreen body adjustments */
@media (max-width: 1024px) {
    .pdf-smart-previewer-fullscreen-body {
        padding: 20px 10px;
        margin: 0 !important;
        /* Allow horizontal scrolling for better text readability */
        overflow-x: auto;
        overflow-y: auto;
        align-items: flex-start;
        justify-content: flex-start;
    }
}

.pdf-smart-previewer-fullscreen-canvas {
    overflow: visible;
    max-width: none;
    width: auto;
    height: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    /* Improve text rendering on mobile */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Enhanced mobile canvas styling for better readability */
@media (max-width: 768px) {
    .pdf-smart-previewer-fullscreen-canvas {
        /* Allow canvas to be wider than screen for better text readability */
        min-width: 100%;
        margin: 0;
        /* Improve text sharpness on mobile devices */
        image-rendering: pixelated;
        image-rendering: -moz-crisp-edges;
        image-rendering: crisp-edges;
    }

    .pdf-smart-previewer-fullscreen-body {
        /* Reduce padding on small screens */
        padding: 10px 5px;
        padding-top: 35px;
        /* Enable momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        /* Ensure content can scroll horizontally */
        overflow-x: auto;
        overflow-y: auto;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-smart-previewer-controls {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .pdf-smart-previewer-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .pdf-smart-previewer-fullscreen-btn {
        width: 100%;
        justify-content: center;
    }

    .pdf-smart-previewer-viewer {
        padding: 15px;
        /* Reduce padding on mobile */
    }

    .pdf-smart-previewer-lock-content {
        padding: 20px;
        max-width: 90%;
    }

    .pdf-smart-previewer-lock-message {
        font-size: 16px;
    }

    .pdf-smart-previewer-popup-content {
        width: 95%;
        margin: 10px;
    }

    .pdf-smart-previewer-popup-body {
        padding: 15px;
    }

    /* .pdf-smart-previewer-fullscreen-content {
        width: 95%;
        height: 95%;
    } */

    .pdf-smart-previewer-fullscreen-header {
        padding: 10px 15px;
    }

    .pdf-smart-previewer-fullscreen-controls {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 1024px) {
    .pdf-smart-previewer-viewer {
        padding: 10px;
        /* Further reduce padding on small mobile */
    }

    .pdf-smart-previewer-fullscreen-controls {
        flex-direction: row;

    }

    .pdf-smart-previewer-controls {
        padding: 10px;
    }

    .pdf-smart-previewer-lock-message {
        font-size: 14px;
    }

    .pdf-smart-previewer-unlock-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .pdf-smart-previewer-popup-header h3 {
        font-size: 16px;
    }

    .pdf-smart-previewer-popup-body {
        padding: 10px;
    }
}

/* Accessibility */
.pdf-smart-previewer-nav-btn:focus,
.pdf-smart-previewer-fullscreen-btn:focus,
.pdf-smart-previewer-unlock-btn:focus,
.pdf-smart-previewer-popup-close:focus,
.pdf-smart-previewer-fullscreen-close:focus {
    /* outline: 2px solid #007cba; */
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pdf-smart-previewer-container {
        border: 2px solid #000;
    }

    .pdf-smart-previewer-nav-btn,
    .pdf-smart-previewer-fullscreen-btn,
    .pdf-smart-previewer-unlock-btn {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .pdf-smart-previewer-nav-btn,
    .pdf-smart-previewer-fullscreen-btn,
    .pdf-smart-previewer-unlock-btn,
    .pdf-smart-previewer-popup-close,
    .pdf-smart-previewer-fullscreen-close {
        transition: none;
    }

    .pdf-smart-previewer-spinner {
        animation: none;
    }
}

/* Print styles */
@media print {
    .pdf-smart-previewer-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }

    .pdf-smart-previewer-controls,
    .pdf-smart-previewer-lock-overlay {
        display: none;
    }

    .pdf-smart-previewer-viewer {
        height: auto;
        overflow: visible;
    }
}

/* Error state */
.pdf-smart-previewer-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Animation for smooth transitions */
.pdf-smart-previewer-container,
.pdf-smart-previewer-lock-overlay {
    animation: pdf-smart-previewer-fade-in 0.5s ease-out;
}

@keyframes pdf-smart-previewer-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Button Styles */
.pdf-smart-previewer-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Button Sizes */
.pdf-smart-previewer-unlock-btn.btn-size-small {
    padding: 8px 16px;
    font-size: 14px;
}

.pdf-smart-previewer-unlock-btn.btn-size-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.pdf-smart-previewer-unlock-btn.btn-size-large {
    padding: 16px 32px;
    font-size: 18px;
}

.pdf-smart-previewer-unlock-btn.btn-size-extra-large {
    padding: 20px 40px;
    font-size: 20px;
}

/* Button Widths */
.pdf-smart-previewer-unlock-btn.btn-width-full {
    width: 100%;
}

.pdf-smart-previewer-unlock-btn.btn-width-auto {
    width: auto;
}

/* Button Hover Animations */
.button-animation-grow .pdf-smart-previewer-unlock-btn:hover {
    transform: scale(1.05);
}

.button-animation-shrink .pdf-smart-previewer-unlock-btn:hover {
    transform: scale(0.95);
}

.button-animation-pulse .pdf-smart-previewer-unlock-btn:hover {
    animation: pulse 1s infinite;
}

.button-animation-bounce .pdf-smart-previewer-unlock-btn:hover {
    animation: bounce 0.6s;
}

.button-animation-shake .pdf-smart-previewer-unlock-btn:hover {
    animation: shake 0.5s;
}

.button-animation-wobble .pdf-smart-previewer-unlock-btn:hover {
    animation: wobble 0.6s;
}

.button-animation-swing .pdf-smart-previewer-unlock-btn:hover {
    animation: swing 0.6s;
}

.button-animation-slide-up .pdf-smart-previewer-unlock-btn:hover {
    transform: translateY(-5px);
}

.button-animation-slide-down .pdf-smart-previewer-unlock-btn:hover {
    transform: translateY(5px);
}

/* Animation Keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translateY(0);
    }

    40%,
    43% {
        transform: translateY(-10px);
    }

    70% {
        transform: translateY(-5px);
    }

    90% {
        transform: translateY(-2px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes wobble {
    0% {
        transform: translateX(0%);
    }

    15% {
        transform: translateX(-25px) rotate(-5deg);
    }

    30% {
        transform: translateX(20px) rotate(3deg);
    }

    45% {
        transform: translateX(-15px) rotate(-3deg);
    }

    60% {
        transform: translateX(10px) rotate(2deg);
    }

    75% {
        transform: translateX(-5px) rotate(-1deg);
    }

    100% {
        transform: translateX(0%);
    }
}

@keyframes swing {
    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* CTA Layout Styles */
.cta-layout-vertical .pdf-smart-previewer-lock-content {
    flex-direction: column;
    text-align: center;
}

.cta-layout-horizontal .pdf-smart-previewer-lock-content {
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.cta-layout-overlay .pdf-smart-previewer-lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 30px;
}

.cta-layout-floating .pdf-smart-previewer-unlock-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cta-layout-sticky .pdf-smart-previewer-lock-overlay {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
}

/* Enhanced Popup Styles */
.pdf-smart-previewer-popup-content .popup-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    display: block;
}

.pdf-smart-previewer-popup-content .popup-subtitle {
    /* margin: 0 0 20px 0; */
    font-size: 16px;
    font-weight: 400;
    color: #666;
    display: block;
}

.pdf-smart-previewer-popup-content .popup-description {
    margin: 0 0 25px 0;
    line-height: 1.6;
    color: #555;
    display: block;
}

/* Position-specific styles */
.popup-title.position-top {
    padding: 20px;
    order: 1;
    margin-bottom: 15px;
}

.popup-title.position-center {
    order: 5;
    /* margin: 20px 0; */
}

.popup-title.position-bottom {
    order: 10;
    /* margin-top: 20px; */
    margin-bottom: 0;
}

.popup-subtitle.position-before_title {
    order: 0;
    /* margin-bottom: 10px; */
}

.popup-subtitle.position-after_title {
    order: 2;
    /* margin-top: 5px; */
    /* margin-bottom: 15px; */
}

.popup-subtitle.position-after_description {
    order: 4;
    /* margin-top: 10px; */
}

.popup-subtitle.position-before_form {
    order: 6;
    /* margin-bottom: 15px; */
}

.popup-description.position-after_title {
    order: 3;
    /* margin-top: 10px; */
}

.popup-description.position-after_subtitle {
    order: 4;
    /* margin-top: 5px; */
}

.popup-description.position-before_form {
    order: 6;
    /* margin-bottom: 20px; */
}

.popup-description.position-after_form {
    order: 8;
    /* margin-top: 20px; */
}

.popup-form-container {
    order: 7;
}

.popup-no-form {
    order: 7;
}

/* Flexbox layout for positioning */
.pdf-smart-previewer-popup-body {
    display: flex;
    flex-direction: column;
}

.popup-form-container {
    justify-items: center;
    /* width: 100%; */
    /* margin:auto; */
    padding: 20px;
    /* margin-top: 20px; */
}

@media (max-width: 500px) {
    .popup-form-container {
        padding: 0px !important;
    }
}

.popup-form-container .hbspt-form {
    width: 100%;
}

.popup-no-form {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Form Field Enhancements */
.pdf-smart-previewer-popup-body input,
.pdf-smart-previewer-popup-body textarea,
.pdf-smart-previewer-popup-body select {
    width: 100%;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.pdf-smart-previewer-popup-body input:focus,
.pdf-smart-previewer-popup-body textarea:focus,
.pdf-smart-previewer-popup-body select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pdf-smart-previewer-popup-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* Submit Button Styling */
.pdf-smart-previewer-popup-body input[type="submit"],
.pdf-smart-previewer-popup-body button[type="submit"],
.pdf-smart-previewer-popup-body .wpcf7-submit {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.pdf-smart-previewer-popup-body input[type="submit"]:hover,
.pdf-smart-previewer-popup-body button[type="submit"]:hover,
.pdf-smart-previewer-popup-body .wpcf7-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Contact Form 7 Specific Styles */
.pdf-smart-previewer-popup-body .wpcf7-form p {
    margin-bottom: 15px;
}

.pdf-smart-previewer-popup-body .wpcf7-form-control-wrap {
    display: block;
}

.pdf-smart-previewer-popup-body .wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.pdf-smart-previewer-popup-body .wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.pdf-smart-previewer-popup-body .wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

/* Gravity Forms Specific Styles */
.pdf-smart-previewer-popup-body .gform_wrapper .gfield {
    margin-bottom: 15px;
}

.pdf-smart-previewer-popup-body .gform_wrapper .gfield_label {
    font-weight: 500;
    margin-bottom: 5px;
}

.pdf-smart-previewer-popup-body .gform_wrapper input[type="text"],
.pdf-smart-previewer-popup-body .gform_wrapper input[type="email"],
.pdf-smart-previewer-popup-body .gform_wrapper textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Responsive Form Styles */
@media (max-width: 768px) {
    .pdf-smart-previewer-popup-content {
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .pdf-smart-previewer-popup-body {
        padding: 20px;
    }

    .popup-title {
        font-size: 20px !important;
    }

    .popup-subtitle {
        font-size: 14px !important;
    }
}

/* Enhanced Popup Animations */
.pdf-smart-previewer-popup-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pdf-smart-previewer-popup-overlay.popup-active {
    opacity: 1;
}

.pdf-smart-previewer-popup-content {
    transform: scale(0.7) translateY(50px);
    transition: all 0.3s ease;
}

.pdf-smart-previewer-popup-overlay.popup-active .pdf-smart-previewer-popup-content {
    transform: scale(1) translateY(0);
}

/* Popup Animation Variants */
.animation-fadeIn .pdf-smart-previewer-popup-content {
    opacity: 0;
    transform: scale(1);
}

.animation-fadeIn.popup-active .pdf-smart-previewer-popup-content {
    opacity: 1;
}

.animation-slideInUp .pdf-smart-previewer-popup-content {
    transform: translateY(100px);
}

.animation-slideInUp.popup-active .pdf-smart-previewer-popup-content {
    transform: translateY(0);
}

.animation-slideInDown .pdf-smart-previewer-popup-content {
    transform: translateY(-100px);
}

.animation-slideInDown.popup-active .pdf-smart-previewer-popup-content {
    transform: translateY(0);
}

.animation-slideInLeft .pdf-smart-previewer-popup-content {
    transform: translateX(-100px);
}

.animation-slideInLeft.popup-active .pdf-smart-previewer-popup-content {
    transform: translateX(0);
}

.animation-slideInRight .pdf-smart-previewer-popup-content {
    transform: translateX(100px);
}

.animation-slideInRight.popup-active .pdf-smart-previewer-popup-content {
    transform: translateX(0);
}

.animation-zoomIn .pdf-smart-previewer-popup-content {
    transform: scale(0.3);
}

.animation-zoomIn.popup-active .pdf-smart-previewer-popup-content {
    transform: scale(1);
}

.animation-bounceIn .pdf-smart-previewer-popup-content {
    transform: scale(0.3);
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animation-bounceIn.popup-active .pdf-smart-previewer-popup-content {
    transform: scale(1);
}

/* Close Button Enhancements */
.pdf-smart-previewer-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: black !important;
    /* border-radius: 50%; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0 !important;
}

.pdf-smart-previewer-popup-close:hover {
    /* background: #ff3742; */
    transform: scale(1.1);
    background: transparent;
}

.pdf-smart-previewer-popup-close:active {
    transform: scale(0.95);
    background: transparent;
}

/* Form Loading State */
.pdf-smart-previewer-form-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.pdf-smart-previewer-form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Success and Error Messages */
.pdf-popup-success-message,
.pdf-popup-error-message {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    animation: slideInUp 0.3s ease;
}

.pdf-popup-success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pdf-popup-error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-content,
.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.success-content i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 10px;
}

.error-content i {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 10px;
}

.success-content h4,
.error-content h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.success-content p,
.error-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Unlock Notification */
.pdf-unlock-notification {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.pdf-unlock-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.notification-content i {
    font-size: 16px;
}

/* Animation for slide in up */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rahul CSS */
.submitted-message {
    /* color: green; */
    margin-bottom: 2rem;
    font-size: 1.4rem;
    display: none;
}

/* Thank You Message Styles */
.pdf-smart-previewer-thank-you-message {
    text-align: center;
    padding: 1.4rem;
    /* background: white; */
    border-radius: 12px;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); */
    max-width: 400px;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 14px;
}

.thank-you-icon i {
    font-size: 32px;
    color: #0162fb;
    animation: checkmark-bounce 0.6s ease-in-out;
}

.thank-you-title {
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 600;
    color: #0162fb;
}

.thank-you-text {
    margin: 0;
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}

@keyframes checkmark-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive styling for thank you message */
@media (max-width: 768px) {
    .pdf-smart-previewer-thank-you-message {
        padding: 20px;
        max-width: 90%;
    }

    .thank-you-icon i {
        font-size: 36px;
    }

    .thank-you-title {
        font-size: 20px;
    }

    .thank-you-text {
        font-size: 14px;
    }
}

/* Lock Screen Close Button */
.pdf-smart-previewer-lock-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    /* border-radius: 50%; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 11;
    font-size: 14px;
    font-weight: 400;
    color: #262626 !important;
    background-color: white;
    padding: 0px !important;
}

.pdf-smart-previewer-lock-close:hover {
    /* background: rgba(0, 0, 0, 0.7); */
    transform: scale(1.1);
    color: black;
    background-color: white;
}

.pdf-smart-previewer-lock-close:active {
    transform: scale(0.95);
}

.title-container {
    padding: 48px 32px;
}

/* Download Button Section */
.pdf-smart-previewer-download-section {
    margin-top: 15px;
    text-align: center;
    padding: 10px 0;
}

.pdf-smart-previewer-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pdf-smart-previewer-download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.pdf-smart-previewer-download-btn:active {
    transform: translateY(0);
}

.pdf-smart-previewer-download-btn i {
    font-size: 14px;
}

/* Modern Pagination Bar */
.pdf-smart-previewer-pagination-bar {
    /* position: absolute; */
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 9;
    border-radius: 0 0 8px 8px;
}

.pdf-smart-previewer-pagination-bar.hidden {
    display: none;
}

/* Page Counter (Left) */
.pdf-smart-previewer-pagination-counter {
    color: white !important;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex-shrink: 0;
    /* Prevent shrinking */
    display: flex;
    align-items: center;
    line-height: 1;
    /* Debug: add background to see if element is there */
    /* background: rgba(255, 0, 0, 0.3); */
}

/* Progress Bar Container (Center) */
.pdf-smart-previewer-progress-container {
    flex: 1;
    margin: 0 20px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

/* Progress Bar Fill */
.pdf-smart-previewer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

/* Progress Bar Glow Effect */
.pdf-smart-previewer-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 0 3px 3px 0;
}

/* Fullscreen Button Container (Right) */
.pdf-smart-previewer-pagination-fullscreen-container {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Fullscreen Button (Right) */
.pdf-smart-previewer-pagination-fullscreen {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0 !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.pdf-smart-previewer-pagination-fullscreen:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.pdf-smart-previewer-pagination-fullscreen:active {
    transform: scale(0.95);
}

/* Responsive Design for Pagination Bar */
@media (max-width: 768px) {
    .pdf-smart-previewer-pagination-bar {
        height: 45px;
        padding: 0 15px;
    }

    .pdf-smart-previewer-pagination-counter {
        font-size: 12px;
        min-width: 50px;
    }

    .pdf-smart-previewer-progress-container {
        margin: 0 15px;
        height: 5px;
    }

    .pdf-smart-previewer-pagination-fullscreen {
        font-size: 16px;
        min-width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .pdf-smart-previewer-pagination-bar {
        height: 40px;
        padding: 0 10px;
    }

    .pdf-smart-previewer-pagination-counter {
        font-size: 11px;
        min-width: 45px;
    }

    .pdf-smart-previewer-progress-container {
        margin: 0 10px;
        height: 4px;
    }

    .pdf-smart-previewer-pagination-fullscreen {
        font-size: 14px;
        min-width: 30px;
        height: 30px;
    }
}

/* Smart Scaling Enhancements */

/* Scroll hint for mobile users */
.pdf-smart-previewer-scroll-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    pointer-events: none;
    animation: pdf-smart-previewer-fade-in-out 3s ease-in-out forwards;
}

.pdf-smart-previewer-scroll-hint-content {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

@keyframes pdf-smart-previewer-fade-in-out {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Enhanced scrollbar styling for better mobile experience */
.pdf-smart-previewer-fullscreen-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pdf-smart-previewer-fullscreen-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.pdf-smart-previewer-fullscreen-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.pdf-smart-previewer-fullscreen-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Content type indicators (optional visual feedback) */
.pdf-smart-previewer-content-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pdf-smart-previewer-content-indicator:hover {
    opacity: 1;
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .pdf-smart-previewer-fullscreen-canvas {
        /* Enhanced rendering for high-DPI displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}