
/* =============================================================================
   EE PDF Viewer - Universal PDF Viewer Styles

   These styles are shared across all PDF viewers in the application:
   - TIC Viewer
   - Check Generation Viewer
   - Any future PDF viewer implementations

   All classes are prefixed with 'ee-' for namespacing.
   Include this file and use the ee- prefixed classes in your templates.
   ============================================================================= */

/* =============================================================================
   Main Layout - Viewer Container
   ============================================================================= */

.ee-viewer-container {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem !important;
}

.ee-viewer-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 600px;
    margin: 0 !important;
    gap: 0.75rem;
}

.ee-viewer-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

/* Sidebar column - wider for better readability */
.ee-viewer-row > .col-md-3 {
    width: 380px;
    min-width: 380px;
    max-width: 380px;
    flex-shrink: 0;
}

/* PDF column - expand to fill remaining space */
.ee-viewer-row > .col-md-9 {
    flex: 1;
    min-width: 0;
}

/* Desktop: use viewport height when space available */
@media (min-width: 900px) and (min-height: 600px) {
    .ee-viewer-row {
        min-height: calc(100vh - 120px);
    }
}

/* Mobile: stack columns vertically */
@media (max-width: 991px) {
    .ee-viewer-container {
        overflow-x: hidden;
        padding: 0.5rem !important;
    }
    .ee-viewer-row {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        min-width: 0 !important;
        min-height: auto !important;
        gap: 0.75rem;
    }
    .ee-viewer-row > .col-md-3,
    .ee-viewer-row > .col-md-9 {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: none !important;
    }
    .ee-pdf-column-wrapper {
        min-height: 500px;
    }
    .ee-pdf-container {
        min-height: 400px;
    }
}

/* Larger screens: expand sidebar more */
@media (min-width: 1400px) {
    .ee-viewer-row > .col-md-3 {
        width: 420px;
        min-width: 420px;
        max-width: 420px;
    }
}

/* =============================================================================
   Sidebar
   ============================================================================= */

.ee-viewer-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* =============================================================================
   Info Panel Card
   ============================================================================= */

.ee-info-panel {
    background: var(--ee-surface, #ffffff);
    border-radius: 12px;
    box-shadow: var(--ee-shadow-md);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ee-border-light);
}

.ee-info-panel-header {
    background: linear-gradient(135deg, var(--ee-indigo) 0%, var(--ee-indigo-dark, #4f46e5) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    flex-shrink: 0;
}

.ee-info-panel-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.ee-info-panel-header h5 i {
    margin-right: 0.625rem;
    opacity: 0.9;
}

.ee-info-panel-body {
    padding: 1.5rem;
    flex: 1;
}

/* Info List */
.ee-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ee-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ee-info-label {
    font-size: 0.8125rem;
    color: var(--ee-text-dim, var(--ee-text-muted));
    font-weight: 500;
    flex-shrink: 0;
}

.ee-info-value {
    font-size: 0.875rem;
    color: var(--ee-text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Detail Rows - Alternative style */
.ee-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ee-border-light);
}

.ee-detail-row:last-child {
    border-bottom: none;
}

.ee-detail-label {
    color: var(--ee-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ee-detail-value {
    color: var(--ee-text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* =============================================================================
   Sidebar Actions
   ============================================================================= */

.ee-sidebar-actions {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--ee-border-light);
    flex-shrink: 0;
}

.ee-sidebar-actions-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--ee-text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--ee-border-light);
}

.ee-sidebar-actions-note i {
    color: var(--ee-indigo);
    margin-top: 0.125rem;
}

.ee-sidebar-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ee-sidebar-actions-buttons button,
.ee-sidebar-actions-buttons a,
.ee-sidebar-actions .ee-sidebar-actions-buttons .btn {
    width: 100%;
    padding: 0.625rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    margin: 0;
}

.ee-sidebar-actions-buttons button i,
.ee-sidebar-actions-buttons button span,
.ee-sidebar-actions-buttons a i,
.ee-sidebar-actions-buttons a span {
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.ee-sidebar-actions-buttons button:hover,
.ee-sidebar-actions-buttons a:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* =============================================================================
   Scrollable List (Check list, etc.)
   ============================================================================= */

.ee-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.ee-list::-webkit-scrollbar {
    width: 6px;
}

.ee-list::-webkit-scrollbar-track {
    background: var(--ee-bg-hover);
}

.ee-list::-webkit-scrollbar-thumb {
    background: var(--ee-border-default);
    border-radius: 3px;
}

.ee-list-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ee-border-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ee-list-item:hover {
    background: var(--ee-indigo-bg);
}

.ee-list-item.active {
    background: var(--ee-indigo-bg-hover);
    border-left: 3px solid var(--ee-indigo);
    padding-left: calc(1.25rem - 3px);
}

.ee-list-item-left {
    flex: 1;
    min-width: 0;
}

.ee-list-item-title {
    font-weight: 600;
    color: var(--ee-indigo);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.ee-list-item-subtitle {
    font-size: 0.8125rem;
    color: var(--ee-text-secondary);
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-list-item-meta {
    font-size: 0.75rem;
    color: var(--ee-text-muted);
}

.ee-list-item-value {
    font-weight: 700;
    color: var(--ee-success);
    font-size: 0.9375rem;
    text-align: right;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.ee-list-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--ee-text-muted);
}

.ee-list-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

/* =============================================================================
   PDF Viewer Card
   ============================================================================= */

.ee-pdf-viewer-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--ee-shadow-lg);
    border: 1px solid var(--ee-border-light);
}

.ee-pdf-column-wrapper {
    position: relative;
    flex: 1;
}

.ee-pdf-viewer-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* =============================================================================
   PDF Container
   ============================================================================= */

.ee-pdf-container {
    flex: 1;
    overflow: auto;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    padding: 1.5rem;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.ee-pdf-container canvas {
    max-width: 100%;
    height: auto;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

/* Multi-page viewer */
.ee-pdf-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.ee-pdf-page-wrapper {
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.ee-pdf-page {
    display: block;
}

/* =============================================================================
   PDF Loading & Error States
   ============================================================================= */

.ee-pdf-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
    color: white;
    text-align: center;
}

.ee-pdf-loading i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: ee-spin 1s linear infinite;
}

.ee-pdf-loading span {
    font-size: 0.9375rem;
    opacity: 0.8;
}

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

/* Shared print preparation and recovery; remains visible above the PDF canvas. */
.ee-pdf-print-status {
    background: var(--ee-bg-secondary, #f1f5f9);
    color: var(--ee-text-primary, #182234);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.75rem 0;
    overflow-wrap: anywhere;
}
.ee-pdf-print-status[hidden] { display: none; }
.ee-pdf-print-status p { margin: 0 0 0.75rem; }
.ee-pdf-print-status button { margin: 0.25rem 0.5rem 0.25rem 0; min-height: 44px; font-size: 0.875rem; background: var(--ee-indigo, #3f51b5); color: #fff; }
.ee-pdf-print-status button:hover, .ee-pdf-print-status button:focus { color: #fff; }
.ee-pdf-print-status button:focus-visible { outline: 2px solid var(--ee-text-primary, #182234); outline-offset: 2px; }
.ee-pdf-print-progress { height: 4px; overflow: hidden; background: var(--ee-border-light, #cbd5e1); margin: 0.75rem 0; border-radius: 4px; }
.ee-pdf-print-progress::after { content: ''; display: block; width: 35%; height: 100%; background: var(--ee-indigo, #3f51b5); animation: ee-pdf-print-wait 1.4s ease-in-out infinite; }
@keyframes ee-pdf-print-wait { from { transform: translateX(-100%); } to { transform: translateX(390%); } }
@media (prefers-reduced-motion: reduce) { .ee-pdf-print-progress::after { animation: none; width: 100%; } }

.ee-pdf-error {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
    text-align: center;
    padding: 40px;
    color: #f87171;
}

.ee-pdf-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #f87171;
}

.ee-pdf-error span,
.ee-pdf-error br + * {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

/* =============================================================================
   Toolbar - Modern Gradient
   ============================================================================= */

.ee-pdf-toolbar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    flex-shrink: 0;
}

.ee-pdf-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    width: 100%;
    gap: 0.75rem;
}

.ee-pdf-toolbar-row.ee-toolbar-secondary {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ee-pdf-toolbar-left,
.ee-pdf-toolbar-center,
.ee-pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* The row's groups wrap onto a second line when the pane is narrower than they are (a long
   title, a search box, the zoom group), so no control ever runs past the pane's right edge
   (C15 photos 09_tic_viewer and 18_exactsign_template_editor at 390 and 1440). */
.ee-pdf-toolbar-row {
    flex-wrap: wrap;
}

.ee-pdf-toolbar-left {
    flex: 1 1 auto;
}

.ee-pdf-toolbar-center,
.ee-pdf-toolbar-right {
    flex-wrap: wrap;
}

.ee-toolbar-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ee-toolbar-title {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ee-toolbar-title i {
    opacity: 0.8;
}

.ee-toolbar-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.5rem;
}

/* =============================================================================
   Page Info
   ============================================================================= */

.ee-pdf-page-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}

/* =============================================================================
   Zoom Controls
   ============================================================================= */

.ee-pdf-zoom-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
}

.ee-pdf-zoom-input {
    width: 50px;
    height: 28px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: none;
    padding: 0;
    transition: all 0.2s ease;
}

.ee-pdf-zoom-input:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ee-pdf-zoom-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}

.ee-pdf-zoom-level {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    min-width: 35px;
    text-align: center;
}

.ee-pdf-zoom-percent {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 500;
}

/* =============================================================================
   Modern Button Group Styles
   ============================================================================= */

.ee-btn-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.ee-btn-group .btn {
    border-radius: 0;
    border: none;
    margin: 0;
    position: relative;
    transition: all 0.2s ease;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
}

.ee-btn-group .btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.ee-btn-group .btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.ee-btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.ee-btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

.ee-btn-group .btn:only-child {
    border-radius: 6px;
}

/* Separator between buttons */
.ee-btn-group .btn:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* =============================================================================
   Toolbar Buttons
   ============================================================================= */

.btn-ee-toolbar {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-ee-toolbar:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-ee-toolbar:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.btn-ee-toolbar:active {
    background: rgba(255, 255, 255, 0.2);
}

.btn-ee-toolbar:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-ee-toolbar i {
    font-size: 0.875rem;
}

/* =============================================================================
   Action Buttons (Approve/Deny/DocuSign in toolbar)
   ============================================================================= */

.btn-ee-action {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-ee-action:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
}

.btn-ee-action:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.btn-ee-action.disabled,
.btn-ee-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Primary action button */
.btn-ee-action-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(79, 70, 229, 0.3) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    color: #c7d2fe;
}

.btn-ee-action-primary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45) 0%, rgba(79, 70, 229, 0.45) 100%);
    border-color: rgba(99, 102, 241, 0.7);
    color: #e0e7ff;
}

/* Success action button (Approve) */
.btn-ee-action-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.25) 100%);
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.btn-ee-action-success:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4) 0%, rgba(22, 163, 74, 0.4) 100%);
    border-color: rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
}

/* Danger action button (Deny) */
.btn-ee-action-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.25) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.btn-ee-action-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4) 0%, rgba(220, 38, 38, 0.4) 100%);
    border-color: rgba(239, 68, 68, 0.7);
    color: #fecaca;
}

/* =============================================================================
   Utility Buttons (Print, Download, etc.)
   ============================================================================= */

.ee-utility-btn-group {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.btn-ee-utility,
a.btn-ee-utility,
button.btn-ee-utility {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-ee-utility:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.btn-ee-utility:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* =============================================================================
   Thumbnail Sidebar
   ============================================================================= */

.ee-thumbnail-sidebar {
    width: 130px;
    min-width: 130px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.ee-thumbnail-item {
    margin-bottom: 1rem;
    text-align: center;
}

.ee-thumbnail-item canvas {
    display: block;
    margin: 0 auto;
    cursor: pointer;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ee-thumbnail-item canvas:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.02);
}

.ee-thumbnail-item canvas.selected-thumb {
    border-color: var(--ee-indigo) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ee-thumbnail-item .page-label {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.375rem;
    font-weight: 500;
}

/* =============================================================================
   Scrollbar Styling
   ============================================================================= */

.ee-viewer-container::-webkit-scrollbar,
.ee-pdf-container::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.ee-viewer-container::-webkit-scrollbar-track,
.ee-pdf-container::-webkit-scrollbar-track {
    background: var(--ee-bg-hover, #f1f5f9);
    border-radius: 5px;
}

.ee-viewer-container::-webkit-scrollbar-thumb,
.ee-pdf-container::-webkit-scrollbar-thumb {
    background: var(--ee-border-default, #d1d5db);
    border-radius: 5px;
}

.ee-viewer-container::-webkit-scrollbar-thumb:hover,
.ee-pdf-container::-webkit-scrollbar-thumb:hover {
    background: var(--ee-text-dim, #9ca3af);
}

/* =============================================================================
   Status Badges
   ============================================================================= */

.ee-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ee-status-badge-draft {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #856404;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.ee-status-badge-approved {
    background: linear-gradient(135deg, #d4edda 0%, #b8e0c2 100%);
    color: #155724;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.ee-status-badge-denied {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    color: #721c24;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* =============================================================================
   Status Banner
   ============================================================================= */

.ee-status-banner {
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.ee-status-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.ee-status-banner-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.ee-status-banner-text {
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
}

.ee-status-banner-subtext {
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    opacity: 0.75;
    font-weight: 500;
}

.ee-status-banner-draft {
    background: linear-gradient(180deg, #fffdf5 0%, #fff9e6 100%);
    color: #856404;
}
.ee-status-banner-draft::before { background: linear-gradient(90deg, #ffc107 0%, #ffca2c 100%); }
.ee-status-banner-draft .ee-status-banner-icon { color: #ffc107; }

.ee-status-banner-approved {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
}
.ee-status-banner-approved::before { background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%); }
.ee-status-banner-approved .ee-status-banner-icon { color: #22c55e; }

.ee-status-banner-denied {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
}
.ee-status-banner-denied::before { background: linear-gradient(90deg, #ef4444 0%, #f87171 100%); }
.ee-status-banner-denied .ee-status-banner-icon { color: #ef4444; }

/* =============================================================================
   Back Navigation
   ============================================================================= */

.ee-back-nav-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ee-border-light);
}

.ee-back-nav-container a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.ee-back-nav-container a:hover {
    text-decoration: none;
}

.ee-back-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--ee-bg-secondary);
    color: var(--ee-indigo);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--ee-border-light);
}

.ee-back-nav-link:hover {
    background: var(--ee-indigo);
    color: white;
    text-decoration: none;
    border-color: var(--ee-indigo);
}

.ee-back-nav-link i {
    font-size: 0.75rem;
    margin-right: 0.625rem;
    opacity: 0.8;
}

.ee-back-nav-link .link-text {
    flex: 1;
}

/* =============================================================================
   PDF.js Text Layer - enables text selection and search highlighting
   ============================================================================= */
.textLayer {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.25;
    line-height: 1.0;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    text-size-adjust: none;
    forced-color-adjust: none;
    transform-origin: 0 0;
    z-index: 2;
}

.textLayer :is(span, br) {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.textLayer span.markedContent {
    top: 0;
    height: 0;
}

.textLayer .highlight {
    margin: -1px;
    padding: 2px 1px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.5) 0%, rgba(245, 158, 11, 0.5) 100%);
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
    transition: all 0.15s ease;
}

.textLayer .highlight.appended {
    position: initial;
}

.textLayer .highlight.begin {
    border-radius: 3px 0 0 3px;
}

.textLayer .highlight.end {
    border-radius: 0 3px 3px 0;
}

.textLayer .highlight.middle {
    border-radius: 0;
}

.textLayer .highlight.selected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.6) 0%, rgba(5, 150, 105, 0.6) 100%);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3), 0 2px 8px rgba(16, 185, 129, 0.4);
    transform: scale(1.02);
}

.textLayer ::selection {
    background: rgba(0, 0, 255, 0.3);
}

/* =============================================================================
   Search UI Styles
   ============================================================================= */
.pdf-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
}

.pdf-search-input {
    width: 150px;
    height: 28px;
    font-size: 0.8125rem;
    color: #fff;
    background: transparent;
    border: none;
    padding: 0 0.5rem;
}

.pdf-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.pdf-search-input:focus {
    outline: none;
}

.pdf-search-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 45px;
    text-align: center;
}

.pdf-search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.25rem 0.375rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pdf-search-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pdf-search-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Page wrapper needs position relative for layers */
.pdf-page-wrapper {
    position: relative;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

/* =============================================================================
   Responsive Adjustments
   ============================================================================= */

/* Compact toolbar on smaller viewports */
@media (max-width: 1100px) {
    .ee-pdf-toolbar-row {
        padding: 0.625rem 1rem;
        gap: 0.5rem;
    }

    .ee-toolbar-title span {
        display: none;
    }

    .ee-pdf-page-info {
        min-width: 100px;
        font-size: 0.8125rem;
    }

    /* Narrower thumbnail sidebar */
    .ee-thumbnail-sidebar {
        width: 100px;
        min-width: 100px;
        padding: 0.75rem 0.5rem;
    }
}

/* Adjust info panel height based on viewport */
@media (max-height: 700px) {
    .ee-info-panel-body {
        max-height: 250px;
        overflow-y: auto;
    }

    .ee-list {
        max-height: 250px;
    }
}

/* Print styles */
@media print {
    .ee-viewer-sidebar,
    .ee-pdf-toolbar {
        display: none !important;
    }

    .ee-viewer-row {
        height: auto;
    }

    .ee-pdf-container {
        background: white;
    }
}
