/* Glass morphism and custom styles */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-btn.active {
    border-left: 4px solid #000;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* PDF Canvas positioning */
#pdfViewer {
    position: relative;
    display: inline-block;
}

#annotationCanvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    z-index: 10;
}

/* Signature canvas styling */
#signatureCanvas {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: crosshair;
}


/* Drag and Drop Enhancements */
.drag-over {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: #3b82f6 !important;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* Hover effects for tools */
.tool-btn:hover {
    transform: translateX(4px);
    transition: all 0.2s ease;
}

/* Apple-style slider */
.apple-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 20px;
}

.apple-slider::-webkit-slider-track {
    background: #e5e7eb;
    height: 3px;
    border-radius: 2px;
}

.apple-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    margin-top: -8px;
}

.apple-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.apple-slider::-webkit-slider-thumb:active {
    background: #f3f4f6;
    transform: scale(1.05);
}

.apple-slider::-moz-range-track {
    background: #e5e7eb;
    height: 3px;
    border-radius: 2px;
    border: none;
}

.apple-slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Professional dark theme input styles */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

/* Enhanced tool button styles */
.tool-btn.active {
    border-color: #3b82f6 !important;
    box-shadow: inset 0 1px 3px rgba(59, 130, 246, 0.3);
}

.tool-btn.active .w-8 {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

/* Professional scrollbar for dark theme */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.3);
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.6);
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.8);
}

/* Drag and drop styles */
.drag-over {
    border-color: #000 !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* PDF page styling */
.pdf-page {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .w-80 {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar-open {
        transform: translateX(0);
    }
}

/* PDF Text Editor Styles */
.editable-text-overlay {
    transition: all 0.2s ease;
}

.editable-text-overlay:hover {
    background-color: rgba(59, 130, 246, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.pdf-text-edit-input {
    font-family: Arial, sans-serif !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.pdf-text-edit-input:focus {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transform: scale(1.02);
}

/* Edit mode button animation */
#editModeBtn {
    transition: all 0.3s ease;
}

#editModeBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}