/* Standardized Abstracted UI Components */
@import 'modals.css';
@import 'views.css';
@import 'portal.css';

/* Protect unclassed SVGs from expanding out of container bounds */
svg:not([class*="w-"]):not([style*="width"]):not([width]) {
    max-width: 24px;
    max-height: 24px;
}

/* 1. Standard Input Fields */
.input-standard {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    border-radius: 0.75rem; /* rounded-xl */
    border-width: 1px;
    border-color: #d1d5db; /* border-gray-300 */
    background-color: #f9fafb; /* bg-gray-50 */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    font-weight: 500;
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

.input-standard:focus {
    background-color: #ffffff;
    border-color: #a855f7; /* focus:border-purple-500 or fallback indigo */
    --tw-ring-color: #e9d5ff; /* focus:ring-purple-200 */
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

select.input-standard {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.input-standard:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 15l7-7 7 7'/%3e%3c/svg%3e");
}

.input-standard.input-sm {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.15rem;
    height: auto;
    min-height: 2.125rem;
}

select.input-standard.input-sm {
    padding-right: 2rem;
    background-position: right 0.65rem center;
    background-size: 1.1em 1.1em;
}

.dark input[type="date"].input-standard::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

/* 2. Standard Responsive Card Wrapper */
.card-standard {
    background-color: #ffffff; /* bg-white */
    padding: 1.5rem; 
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04); /* shadow-md */
    border-width: 1px;
    border-color: #f3f4f6; /* border-gray-100 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .card-standard {
        padding: 2rem; 
    }
}

/* 2b. Small Responsive Card Wrapper */
.card-small {
    background-color: #ffffff; /* bg-white */
    padding: 1.25rem; 
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04); /* shadow-md */
    border-width: 1px;
    border-color: #f3f4f6; /* border-gray-100 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .card-small {
        padding: 1.5rem; 
    }
}


/* 3. Paginated Grid/Table Wrapper */
.grid-standard {
    background-color: #ffffff; /* bg-white */
    padding: 1.5rem; /* p-6 */
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    border-width: 1px;
    border-color: #f3f4f6; /* border-gray-100 */
    margin-top: 2rem; /* mt-8 */
}

/* 4. Modal Standards */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100; /* z-100 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(17, 24, 39, 0.6); /* bg-gray-900 bg-opacity-60 */
    padding: 1rem; /* p-4 */
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay.modal-closing {
    opacity: 0 !important;
    background-color: rgba(17, 24, 39, 0) !important;
}

.modal-overlay.modal-closing .modal-box {
    animation: modalPopOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.modal-overlay.modal-box-closing .modal-box {
    animation: modalPopOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.modal-overlay.modal-overlay-closing {
    opacity: 0 !important;
    background-color: rgba(17, 24, 39, 0) !important;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal-box {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    background-color: #ffffff; /* bg-white */
    padding: 1.5rem; /* p-6 for mobile */
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
    width: 100%;
    max-width: 100%; /* Better constraint for mobile to prevent horizontal overflow */
    min-width: min(100%, 28rem);
    position: relative;
    border-top-width: 4px;
}

@media (min-width: 640px) {
    .modal-box {
        padding: 2rem; /* p-8 for larger screens */
    }
}

#docModalContainer {
    padding: 0px !important;
    min-width: min(800px, 95vw) !important;
}

.modal-box-lg {
    min-width: min(100%, 32rem);
}

@keyframes modalPopIn {
    0% { opacity: 0; transform: scale3d(0.96, 0.96, 1) translate3d(0, 8px, 0); }
    100% { opacity: 1; transform: scale3d(1, 1, 1) translate3d(0, 0, 0); }
}

@keyframes modalPopOut {
    0% { opacity: 1; transform: scale3d(1, 1, 1) translate3d(0, 0, 0); }
    100% { opacity: 0; transform: scale3d(0.96, 0.96, 1) translate3d(0, 8px, 0); }
}

.modal-wide {
    width: 100% !important;
    max-width: 56rem !important; /* 896px / 4xl */
}

/* Generic sizing for the modal close button */
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #f3f4f6 !important;
    color: #000000 !important;
    padding: 0.5rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease-in-out;
    cursor: pointer;
    border: none;
}

.modal-close-btn:hover, 
.modal-close-btn:active {
    background-color: #4f46e5 !important; /* Tailwind indigo-600 */
    color: white !important;
    transform: scale(1.05);
}

.modal-close-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Generic card action buttons (.card-min-btn, .favorite-btn, .drag-handle) sharing exact layout */
.card-min-btn, .favorite-btn, .drag-handle {
    background-color: #f3f4f6 !important;
    color: #000000 !important;
    border-radius: 9999px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 300ms ease-in-out !important;
    cursor: pointer !important;
    border: none !important;
    width: 1.625rem !important;
    height: 1.625rem !important;
    padding: 0 !important;
}

.card-min-btn:hover, .card-min-btn:active,
.favorite-btn:hover, .favorite-btn:active,
.drag-handle:hover, .drag-handle:active {
    background-color: #4f46e5 !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.drag-handle, .dropdown-drag-handle, #heroButtonsDesktop button {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 3 L21 9 H11 Z M16 29 L21 23 H11 Z M3 16 L9 11 V21 Z M29 16 L23 11 V21 Z M16 7 V25 M7 16 H25' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3Cpath d='M16 3 L21 9 H11 Z M16 29 L21 23 H11 Z M3 16 L9 11 V21 Z M29 16 L23 11 V21 Z M16 7 V25 M7 16 H25' stroke='%23312e81' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='%23312e81'/%3E%3C/svg%3E") 16 16, move !important;
}

.favorite-btn.is-active {
    color: #eab308 !important; /* Tailwind yellow-500 */
}

/* On hover, if it is active, keep the star yellow but maybe lighter? Or just keep yellow. */
.favorite-btn.is-active:hover {
    color: #fde047 !important; /* Lighter yellow on hover */
}

.card-min-btn svg, .favorite-btn svg, .drag-handle svg {
    width: 0.875rem !important;
    height: 0.875rem !important;
}

/* 5. Dark Mode Auto-Mapping (Explicit class mapping for in-app theme toggler) */
.dark .card-standard, html.dark .card-standard { background-color: #0f172a; border-color: #1e293b; color: #f8fafc; }
.dark .card-small, html.dark .card-small { background-color: #0f172a; border-color: #1e293b; color: #f8fafc; }
.dark .grid-standard, html.dark .grid-standard { background-color: #0f172a; border-color: #1e293b; color: #f8fafc; }
.dark .modal-box, html.dark .modal-box { background-color: #0f172a; color: #f8fafc; border-color: #1e293b; }
.dark .input-standard, html.dark .input-standard { background-color: #1e293b; border-color: #334155; color: #f8fafc; }
.dark .input-standard:focus, html.dark .input-standard:focus { background-color: #0f172a; border-color: #6366f1; }

/* Dark mode for card action buttons */
.dark .card-min-btn, html.dark .card-min-btn,
.dark .favorite-btn, html.dark .favorite-btn,
.dark .drag-handle, html.dark .drag-handle {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

.dark .card-min-btn:hover, html.dark .card-min-btn:hover,
.dark .card-min-btn:active, html.dark .card-min-btn:active,
.dark .favorite-btn:hover, html.dark .favorite-btn:hover,
.dark .favorite-btn:active, html.dark .favorite-btn:active,
.dark .drag-handle:hover, html.dark .drag-handle:hover,
.dark .drag-handle:active, html.dark .drag-handle:active {
    background-color: #4f46e5 !important;
    color: white !important;
}

.dark select.input-standard {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
}

.dark select.input-standard:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 15l7-7 7 7'/%3e%3c/svg%3e");
}

/* Browser Autofill overrides for Dark Mode */
.dark .input-standard:-webkit-autofill,
.dark .input-standard:-webkit-autofill:hover, 
.dark .input-standard:-webkit-autofill:focus, 
.dark .input-standard:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #374151 inset !important;
    -webkit-text-fill-color: #f3f4f6 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* In-app specific widget dark mode manual bindings */
.dark .history-card { background-color: #1f2937; border-color: #374151; }
.dark .history-card:hover { border-color: #6366f1; }
.dark .history-day-circle { background-color: #374151; color: #818cf8; }
.dark .history-card h4 { color: #e5e7eb; }
.dark .history-card span { color: #9ca3af; }
.dark .history-divider { border-color: #374151; }
.dark .btn-preview { background-color: rgba(99, 102, 241, 0.1); color: #a5b4fc; }
.dark .btn-preview:hover { background-color: rgba(99, 102, 241, 0.2); }
.dark .btn-delete { background-color: rgba(244, 63, 94, 0.1); color: #fda4af; }
.dark .btn-delete:hover { background-color: rgba(244, 63, 94, 0.2); }

/* Transcript Modal Elements (Dark Mode) */
.dark #transcriptModalTitle { color: #a5b4fc !important; } /* text-indigo-300 */
.dark #transcriptModal .text-gray-500 { color: #9ca3af !important; }
.dark .chat-bubble.ai-bubble { background-color: #374151 !important; border-color: #4b5563 !important; color: #f3f4f6 !important; }
.dark .chat-bubble.user-bubble { background-color: #312e81 !important; border-color: #4338ca !important; color: #e0e7ff !important; }
.dark .chat-bubble .ai-icon { color: #818cf8 !important; }

/* Analytics Module Explicit Theme Decoupling */
.analytics-text-primary { color: #1f2937; }
.analytics-text-secondary { color: #6b7280; }
.analytics-text-accent { color: #4f46e5; }
.analytics-text-emerald { color: #059669; }
.analytics-bg-skeleton { background-color: #e5e7eb; }
.analytics-overlay { background-color: rgba(255, 255, 255, 0.6); }
.analytics-border { border-color: #e5e7eb; }
.analytics-accent-container { background-color: #eef2ff; border-color: #e0e7ff; }

.dark .analytics-text-primary { color: #f3f4f6; }
.dark .analytics-text-secondary { color: #9ca3af; }
.dark .analytics-text-accent { color: #818cf8; }
.dark .analytics-text-emerald { color: #34d399; }
.dark .analytics-bg-skeleton { background-color: #374151; }
.dark .analytics-overlay { background-color: rgba(17, 24, 39, 0.8); }
.dark .analytics-border { border-color: #374151; }
.dark .analytics-accent-container { background-color: rgba(31, 41, 55, 0.5); border-color: #374151; }

/* Global Audio Controls Dark Mode Scheme */
.dark audio, html.dark audio {
    color-scheme: dark;
}

/* 6. Custom Checkboxes (Native implementation to bypass JIT compilation issues) */
.custom-chk-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.custom-chk-box {
    width: 100%;
    height: 100%;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #ffffff;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-chk-svg {
    position: absolute;
    top: -5px;
    left: 0px;
    width: 26px;
    height: 26px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Checked States - Indigo by default */
.custom-chk-input:checked ~ .custom-chk-box {
    border-color: #4f46e5;
}
.custom-chk-input:checked ~ .custom-chk-svg {
    opacity: 1;
    color: #4f46e5;
}

/* Emerald Checkbox Variant */
.custom-chk-input.color-emerald:checked ~ .custom-chk-box {
    border-color: #10b981;
}
.custom-chk-input.color-emerald:checked ~ .custom-chk-svg {
    color: #10b981;
}

/* Standard Label Text Highlighting */
.custom-chk-input:checked ~ .custom-chk-text-indigo { color: #4f46e5 !important; }
.custom-chk-input:checked ~ .custom-chk-text-emerald { color: #10b981 !important; }

/* 7. Global Custom Tooltip */
.global-ui-tooltip {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    border-radius: 0.375rem !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    z-index: 99999 !important;
}

.global-ui-tooltip.visible {
    opacity: 1;
}

/* Responsive PDF Mobile Fallback min-height */
.pdf-mobile-fallback-height {
    min-height: 380px;
}
@media (min-width: 640px) {
    .pdf-mobile-fallback-height {
        min-height: 400px;
    }
}

/* 8. Sleek Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.35);
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.55);
}

/* Chat Assistant Tabs Pointer Rule */
#chat-tabs-row button {
    cursor: pointer;
}

/* Unified Contract HTML Rendering Rules */
.contract-html-content { font-family: 'Andika', sans-serif; font-size: 0.875rem; line-height: 1.65; color: #1e293b; }
.dark .contract-html-content { color: #f1f5f9; }
.contract-html-content p { margin-bottom: 0.75rem; line-height: 1.65; }
.contract-html-content h1 { font-size: 1.4rem; font-weight: 800; color: #1e1b4b; margin-top: 1.25rem; margin-bottom: 0.75rem; display: block; }
.dark .contract-html-content h1 { color: #f8fafc; }
.contract-html-content h2 { font-size: 1.2rem; font-weight: 800; color: #312e81; margin-top: 1rem; margin-bottom: 0.5rem; display: block; }
.dark .contract-html-content h2 { color: #a5b4fc; }
.contract-html-content h3 { font-size: 1.05rem; font-weight: 750; color: #4f46e5; margin-top: 1rem; margin-bottom: 0.35rem; display: block; }
.dark .contract-html-content h3 { color: #818cf8; }
.contract-html-content blockquote { border-left: 4px solid #6366f1; padding: 0.6rem 1rem; color: #334155; font-style: italic; margin-top: 0.75rem; margin-bottom: 0.75rem; background-color: rgba(238, 242, 255, 0.6); border-radius: 0 0.75rem 0.75rem 0; display: block; }
.dark .contract-html-content blockquote { color: #e2e8f0; background-color: rgba(49, 46, 129, 0.4); border-left-color: #818cf8; }
.contract-html-content blockquote p { margin: 0; color: inherit; }
.contract-html-content blockquote * { color: inherit; }
.contract-html-content ul { list-style-type: disc; margin-left: 1.5rem; margin-top: 0.5rem; margin-bottom: 0.5rem; display: block; }
.contract-html-content ol { list-style-type: decimal; margin-left: 1.5rem; margin-top: 0.5rem; display: block; }
.contract-html-content li { display: list-item; margin-top: 0.15rem; margin-bottom: 0.15rem; }
.contract-html-content b, .contract-html-content strong { font-weight: 800; color: #0f172a; }
.dark .contract-html-content b, .dark .contract-html-content strong { color: #ffffff; }
.contract-html-content i, .contract-html-content em { font-style: italic; }
.contract-html-content u { text-decoration: underline; }
.contract-html-content s, .contract-html-content strike { text-decoration: line-through; }
.contract-html-content table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; margin-bottom: 0.75rem; }
.contract-html-content th, .contract-html-content td { border: 1px solid #cbd5e1; padding: 0.5rem 0.75rem; text-align: left; }
.dark .contract-html-content th, .dark .contract-html-content td { border-color: #334155; }
.contract-html-content th { background-color: #f1f5f9; font-weight: 800; }
.dark .contract-html-content th { background-color: #1e293b; }

/* Modal Overlay Backdrop Blur */
.modal-overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
}

.dark .modal-overlay {
    background-color: rgba(3, 7, 18, 0.75) !important;
}

/* Bento Box Grid Card Standards */
.card-bento-hero {
    border-radius: 1.5rem !important; /* rounded-3xl */
    padding: 1.5rem !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.dark .card-bento-hero {
    border-color: rgba(30, 41, 59, 0.8) !important;
}

/* Modern Contract Signature Block Design System */
.signature-card-box {
    position: relative;
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease-in-out;
}

.dark .signature-card-box {
    border-color: #334155;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Printable / PDF Light-Theme Hard Enforcement */
.printable-light-theme,
.printable-light-theme *,
body.printable-light-theme .signature-card-box {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.signature-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.signature-status-signed {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.dark .signature-status-signed {
    background-color: rgba(6, 78, 59, 0.5);
    color: #34d399;
    border-color: #047857;
}

.signature-status-pending {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.dark .signature-status-pending {
    background-color: rgba(120, 53, 15, 0.4);
    color: #fbbf24;
    border-color: #92400e;
}

.signature-status-hardcopy {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.dark .signature-status-hardcopy {
    background-color: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    border-color: #334155;
}

/* Cross-Browser Range Slider Styling with Vertically Centered Thumb */
input[type=range].slider-range-custom {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #cbd5e1;
    border-radius: 9999px;
    outline: none;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.dark input[type=range].slider-range-custom {
    background: #334155;
}

/* WebKit (Chrome, Safari, Edge) */
input[type=range].slider-range-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    margin-top: 0px;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type=range].slider-range-custom::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #4338ca;
}

/* Firefox */
input[type=range].slider-range-custom::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type=range].slider-range-custom::-moz-range-thumb:hover {
    transform: scale(1.15);
    background: #4338ca;
}

input[type=range].slider-range-custom::-moz-range-track {
    height: 8px;
    background: #cbd5e1;
    border-radius: 9999px;
}

.dark input[type=range].slider-range-custom::-moz-range-track {
    background: #334155;
}

/* Contract Addendums & Product Annexes Page Break Rules */
.contract-addendum-section,
.break-before-page {
    page-break-before: always !important;
    break-before: page !important;
}


