/* ================================== */
/* css/pdf-extract.css
/* Page-specific styles for Extractor
/* V3: Added gradient input box
/* ================================== */

/* 1. Page Preview Card (for selection) */
#extractPagePreview .page-card {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease-out;
    border: 3px solid transparent;
    border-radius: 1rem; /* Slightly different rounding */
    padding: 2px;
}

#extractPagePreview .page-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 0.85rem; 
    box-shadow: 0 4px 12px var(--shadow-color);
    opacity: 1;
    transition: all 0.2s ease;
}

#extractPagePreview .page-card:hover::before {
     box-shadow: 0 8px 20px var(--shadow-color-darker);
     transform: translateY(-2px);
}

/* 2. Selected Page State (THEME: EMERALD) */
#extractPagePreview .page-card.selected {
    border-color: #10b981; /* emerald-500 */
    transform: scale(1.03);
}

#extractPagePreview .page-card.selected::before {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* 3. Checkbox on Page Card (THEME: EMERALD) */
.page-extract-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    width: 22px;
    height: 22px;
    accent-color: #10b981; /* emerald-500 */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    cursor: pointer;
    transform: scale(1.1);
}

/* 4. (NEW) Gradient Border Input Box */
.input-gradient-wrap {
    padding: 2px; /* This is the border thickness */
    border-radius: 0.6rem; /* Slightly larger than the input's 0.5rem */
    
    /* === THEME: EMERALD/GREEN === */
    /* Logo: from-emerald-500 (#10b981) to-green-600 (#16a34a) */
    background: linear-gradient(to bottom right, #10b981, #16a34a);
    
    transition: all 0.3s ease;
}
.input-gradient-wrap:focus-within {
    /* === THEME: EMERALD/GREEN === */
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); /* emerald-500 glow */
}

/* Style the actual input *inside* the wrapper */
.input-gradient-wrap #extractRangeInput {
    width: 100%;
    border: none !important; /* Remove default border */
    outline: none !important; /* Remove default outline */
    border-radius: 0.5rem; /* Inner radius */
    padding: 0.5rem 0.75rem; /* Inner padding */
    
    /* Use CSS variables for light/dark mode background */
    background-color: var(--bg-primary); 
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

/* Handle dark mode background for the input */
body.dark .input-gradient-wrap #extractRangeInput {
     background-color: var(--bg-secondary-hover);
}

/* Fix placeholder text color (it's often too light) */
.input-gradient-wrap #extractRangeInput::placeholder {
    color: var(--text-tertiary);
    opacity: 0.8;
}

/* 5. Fix File Info Text Visibility */
#extractFileInfo p#extractFileName {
    color: var(--text-primary) !important;
    font-weight: 600;
}

#extractFileInfo p#extractPageCount {
    color: var(--text-secondary) !important;
    font-weight: 500;
}