/* ================================== */
/* css/pdf-sign.css
/* Page-specific styles for Sign Tool
/* Theme: Pink/Rose
/* ================================== */

/* 1. Tabs & Hover Animation */
.sig-tab {
    color: white;
    background: transparent;
    transition: all 0.2s ease;
}
.sig-tab:hover:not(.active) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}
.sig-tab.active {
    background: white;
    color: #ec4899 !important; /* pink-500 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 700;
}
body.dark .sig-tab.active {
    background: #374151; /* gray-700 */
    color: #f472b6 !important; /* pink-400 */
}

/* Mobile responsive tabs */
@media (max-width: 640px) {
    .sig-tab {
        font-size: 10px;
        padding: 6px 4px;
    }
}

/* 2. Gradient Border Input Box */
.input-gradient-wrap {
    padding: 2px;
    border-radius: 0.6rem;
    background: linear-gradient(to bottom right, #ec4899, #f43f5e); /* Pink to Rose */
    transition: all 0.3s ease;
}
.input-gradient-wrap:focus-within {
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

.input-gradient-wrap input {
    width: 100%;
    border: none !important;
    outline: none !important;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-primary); 
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

body.dark .input-gradient-wrap input {
     background-color: var(--bg-secondary-hover);
}

@media (max-width: 640px) {
    .input-gradient-wrap input {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

/* 3. Draw Pad Canvas */
#signaturePad {
    position: absolute;
    top: 0; 
    left: 0;
}

#drawContainer {
    touch-action: none; /* Better mobile drawing */
}

/* 4. Signature Pad Control Buttons */
.sig-control-btn {
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

@media (max-width: 640px) {
    .sig-control-btn {
        font-size: 10px;
        padding: 6px 8px;
    }
}

/* 5. Pen Color Swatches */
.pen-color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
    position: relative;
    z-index: 10;
}
.pen-color-btn.active-pen {
    border-color: #ec4899; /* pink-500 */
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
    transform: scale(1.15);
}

@media (max-width: 640px) {
    .pen-color-btn {
        width: 20px;
        height: 20px;
    }
}

/* 6. Font Preview */
.font-preview-item {
    font-size: 1.25rem;
    padding: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1.5;
}

.font-preview-item.active-font {
    border: 2px solid #ec4899; /* Pink active border */
    background: rgba(236, 72, 153, 0.1);
}

@media (max-width: 640px) {
    .font-preview-item {
        font-size: 1rem;
        padding: 0.5rem;
    }
}

/* 6a. Scrollbar styling for signature source column */
.sig-content::-webkit-scrollbar {
    width: 6px;
}

.sig-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sig-content::-webkit-scrollbar-thumb {
    background: #ec4899;
    border-radius: 10px;
}

.sig-content::-webkit-scrollbar-thumb:hover {
    background: #f43f5e;
}

#fontPreview::-webkit-scrollbar {
    width: 6px;
}

#fontPreview::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#fontPreview::-webkit-scrollbar-thumb {
    background: #ec4899;
    border-radius: 10px;
}

@media (max-width: 640px) {
    .sig-content::-webkit-scrollbar,
    #fontPreview::-webkit-scrollbar {
        width: 4px;
    }
}

/* 6b. Pen size slider styling */
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 640px) {
    input[type="range"]::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
}

/* 7. Signature Placement */
.placed-signature-overlay {
    position: absolute;
    z-index: 100;
    cursor: grab;
    border: 1px dashed #ec4899; 
    transition: opacity 0.1s;
}

.placed-signature-overlay:hover {
    border: 2px solid #ec4899;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.placed-signature-overlay:active {
    cursor: grabbing;
}

.sig-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #ec4899;
    cursor: se-resize;
    border-radius: 50%;
    border: 2px solid white;
}

.sig-resize-handle:hover {
    background: #f43f5e;
    transform: scale(1.2);
}

@media (max-width: 640px) {
    .sig-resize-handle {
        width: 16px;
        height: 16px;
    }
}

/* 8. Mobile Layout Improvements */
@media (max-width: 768px) {
    .modal-content-wrapper {
        border-radius: 1rem !important;
    }
    
    .glass-column {
        padding: 0.75rem !important;
    }
    
    /* Ensure proper height distribution on mobile */
    #signModal .flex-1.flex.flex-col {
        min-height: 0;
    }
    
    /* Better touch targets */
    button {
        min-height: 32px;
        min-width: 32px;
    }
}

/* 9. Extra small screens breakpoint */
@media (min-width: 400px) {
    .xs\:inline {
        display: inline !important;
    }
}