/* ================================================================
   LOCK PDF - Workspace Styling
   (Excludes Upload Area & Dark Mode)
   ================================================================ */

/* ------------------------------------------------
   1.  WORKSPACE (Main Container)
------------------------------------------------ */
.tool-wrapper .workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    background: #f8fafc;
    border-radius: 12px;
    box-sizing: border-box;
}

/* ------------------------------------------------
   2.  WORKSPACE TOP (Flex Row: Viewer + Options)
------------------------------------------------ */
.workspace-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: transparent;
}

/* ------------------------------------------------
   3.  VIEWER (Left Side)
------------------------------------------------ */
.viewer {
    flex: 1.2;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

/* ---- PDF Navigation Bar ---- */
.pdf-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 16px;
    background: #f1f5f9;
    border-radius: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #eef2ff;
    border-color: #2563eb;
    color: #2563eb;
}

.page-info {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}
.page-info .current-page,
.page-info .total-pages {
    font-weight: 700;
    color: #0f172a;
}

.goto-page {
    display: flex;
    align-items: center;
    gap: 4px;
}

.goto-input {
    width: 48px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s;
}

.goto-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.goto-btn {
    padding: 4px 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.goto-btn:hover {
    background: #1d4ed8;
}

/* ---- PDF Container (Canvas Area) ---- */
.pdf-container {
    position: relative;
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-container canvas {
    display: block;
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* ---- Watermark Overlay (Static Text) ---- */
.watermark-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 48px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.08);
    letter-spacing: 4px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    font-family: 'Arial Black', sans-serif;
}

/* ---- Lock Overlay ---- */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    padding: 24px;
    text-align: center;
    border-radius: 8px;
}

.overlay h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.overlay p {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.timer {
    font-size: 48px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: #ffffff;
}

.progress {
    width: 80%;
    max-width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ------------------------------------------------
   4.  OPTIONS PANEL (Right Side)
------------------------------------------------ */
.options-panel {
    flex: 0 0 320px;
    min-width: 280px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

/* ---- Form Groups ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Inputs, Selects, Text */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Custom Pages Input Group */
.custom-pages-group {
    margin-top: 4px;
}

.input-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* ---- Workspace Actions (Buttons) ---- */
.workspace-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 48px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Primary Process Button (Lock) */
.process-btn {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.process-btn:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Secondary Download Button */
.download-btn {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.download-btn:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* ------------------------------------------------
   5.  RESPONSIVE DESIGN
------------------------------------------------ */
@media (max-width: 992px) {
    .options-panel {
        flex: 0 0 280px;
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .workspace {
        padding: 0 12px 30px;
    }

    .workspace-top {
        flex-direction: column;
        gap: 20px;
    }

    .options-panel {
        flex: 1 1 100%;
        width: 100%;
        min-width: unset;
        position: static;
        padding: 20px;
    }

    .viewer {
        padding: 12px;
        width: 100%;
    }

    .pdf-container {
        min-height: 300px;
    }

    .pdf-container canvas {
        max-height: 400px;
    }

    .watermark-display {
        font-size: 28px;
    }

    .overlay h3 {
        font-size: 22px;
    }

    .timer {
        font-size: 32px;
        padding: 4px 16px;
    }

    .pdf-nav {
        gap: 8px;
        padding: 6px 10px;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .page-info {
        font-size: 13px;
    }

    .goto-input {
        width: 42px;
        padding: 3px 4px;
        font-size: 13px;
    }

    .goto-btn {
        padding: 3px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .pdf-container {
        min-height: 200px;
    }

    .pdf-container canvas {
        max-height: 280px;
    }

    .watermark-display {
        font-size: 20px;
    }

    .overlay h3 {
        font-size: 18px;
    }

    .overlay p {
        font-size: 14px;
    }

    .timer {
        font-size: 24px;
        padding: 4px 12px;
    }

    .options-panel {
        padding: 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 42px;
    }

    .pdf-nav {
        gap: 4px;
        padding: 4px 6px;
    }

    .page-info {
        font-size: 12px;
    }

    .goto-input {
        width: 36px;
    }
}