/**
 * Custom CSS utilities for CSP compliance
 * These classes replace inline styles that Bootstrap doesn't cover
 */

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
    --elephas-purple: #6a1f75;
    --elephas-purple-light: #8b5cf6;
}

/* ============================================
   Width Utilities - Fixed Pixel Values
   ============================================ */
.w-30px { width: 30px; }
.w-70px { width: 70px; }
.w-80px { width: 80px; }
.w-90px { width: 90px; }
.w-96px { width: 96px; }
.w-110px { width: 110px; }
.w-120px { width: 120px; }
.w-140px { width: 140px; }
.w-150px { width: 150px; }
.w-160px { width: 160px; }
.w-180px { width: 180px; }
.w-200px { width: 200px; }
.w-220px { width: 220px; }
.w-240px { width: 240px; }
.w-260px { width: 260px; }
.w-280px { width: 280px; }
.w-320px { width: 320px; }

/* Width percentages not in Bootstrap */
.w-1p { width: 1%; }
.w-6p { width: 6%; }
.w-8p { width: 8%; }
.w-10p { width: 10%; }
.w-12p { width: 12%; }
.w-14p { width: 14%; }
.w-16p { width: 16%; }
.w-18p { width: 18%; }
.w-22p { width: 22%; }
.w-26p { width: 26%; }
.w-25p { width: 25%; }
.w-28p { width: 28%; }
.w-30p { width: 30%; }
.w-35p { width: 35%; }
.w-36p { width: 36%; }
.w-28p { width: 28%; }
.w-40p { width: 40%; }

/* ============================================
   Min-Width Utilities
   ============================================ */
.min-w-90px { min-width: 90px; }
.min-w-100px { min-width: 100px; }
.min-w-120px { min-width: 120px; }
.min-w-160px { min-width: 160px; }
.min-w-170px { min-width: 170px; }
.min-w-1000px { min-width: 1000px; }

/* ============================================
   Combined Min/Max Width Utilities
   ============================================ */
.minmax-w-120-160 { min-width: 120px; max-width: 160px; }

/* ============================================
   Max-Width Utilities
   ============================================ */
.max-w-220px { max-width: 220px; }
.max-w-260px { max-width: 260px; }
.max-w-360px { max-width: 360px; }
.max-w-400px { max-width: 400px; }
.max-w-420px { max-width: 420px; }
.max-w-520px { max-width: 520px; }
.max-w-600px { max-width: 600px; }
.max-w-720px { max-width: 720px; }
.max-w-760px { max-width: 760px; }

/* ============================================
   Height Utilities
   ============================================ */
.h-10px { height: 10px; }
.h-60vh { height: 60vh; }
.h-70vh { height: 70vh; }
.h-80vh { height: 80vh; }
.min-h-70vh { min-height: 70vh; }
.max-h-60vh { max-height: 60vh; }
.max-h-70vh { max-height: 70vh; }
.max-h-80vh { max-height: 80vh; }
.max-h-300px { max-height: 300px; }
.max-h-400px { max-height: 400px; }

/* Fixed height utilities for MDReview */
.h-300px { height: 300px; }
.h-600px { height: 600px; }
.h-800px { height: 800px; }

/* Cursor utilities */
.cursor-not-allowed { cursor: not-allowed; }

/* MDReview PDF controls toolbar */
.pdf-controls-bar {
    background: #f8f9fa;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* PDF canvas container */
.pdf-canvas-container {
    overflow: scroll;
    background: #525659;
    text-align: center;
    height: calc(100% - 60px);
}

/* PDF canvas styling */
.pdf-canvas-styled {
    margin: 10px auto;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Loading overlay centered */
.loading-overlay-centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Button styled like Elephas primary */
.btn-elephas-primary {
    background-color: var(--elephas-purple);
    color: white;
    border-color: var(--elephas-purple);
}
.btn-elephas-primary:hover {
    background-color: #5a1965;
    border-color: #5a1965;
    color: white;
}

/* Badge styled with Elephas secondary */
.badge-elephas-secondary {
    background-color: var(--elephas-purple-light);
    color: white;
}

/* ============================================
   Color Utilities - Elephas Brand
   ============================================ */
.text-elephas { color: var(--elephas-purple); }
.bg-elephas { background-color: var(--elephas-purple); }
.bg-elephas-light { background-color: var(--elephas-purple-light); }
.border-elephas { border-color: var(--elephas-purple) !important; }

/* Badge color utilities (Bootstrap purple) */
.bg-purple { background-color: #6f42c1; }

/* ============================================
   Font Size Utilities
   ============================================ */
.fs-08 { font-size: 0.8rem; }
.fs-085 { font-size: 0.85rem; }
.fs-14px { font-size: 14px; }

/* ============================================
   Text Utilities
   ============================================ */
.text-pre-wrap { white-space: pre-wrap; }

/* ============================================
   Layout Utilities
   ============================================ */
.z-1050 { z-index: 1050; }
.grid-col-full { grid-column: 1 / -1; }

/* ============================================
   Padding Utilities (values not in Bootstrap)
   ============================================ */
.p-20px { padding: 20px; }
.py-5px { padding-top: 5px; padding-bottom: 5px; }
.px-10px { padding-left: 10px; padding-right: 10px; }
.mb-20px { margin-bottom: 20px; }

/* ============================================
   Border Utilities
   ============================================ */
.border-bottom-light { border-bottom: 1px solid #ddd; }

/* ============================================
   Shadow Utilities
   ============================================ */
.shadow-card { box-shadow: 0 4px 8px rgba(0,0,0,0.3); }

/* ============================================
   Transform Utilities
   ============================================ */
.translate-center { transform: translate(-50%, -50%); }
.transition-transform { transition: transform 0.2s; }

/* ============================================
   Cursor Utilities
   ============================================ */
.cursor-pointer { cursor: pointer; }

/* ============================================
   Combined Layout Utilities
   ============================================ */
.h-500px { height: 500px; }
.fs-09 { font-size: 0.9rem; }
.mt-10px { margin-top: 10px; }

/* ============================================
   Modal/Component Utilities
   ============================================ */
.modal-header-elephas {
    background-color: var(--elephas-purple);
    color: white;
}

/* ============================================
   Flex Utilities
   ============================================ */
.flex-0-0-auto { flex: 0 0 auto; }

/* ============================================
   Iframe Utilities (for PDF viewers, etc.)
   ============================================ */
.iframe-fullsize {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   Audit/Timeline Utilities
   ============================================ */
.audit-card-border {
    border-left-width: 3px !important;
    border-left-style: solid !important;
}

/* Audit category colors */
.audit-cat-document { --audit-color: #6366f1; --audit-bg: #eef2ff; }
.audit-cat-signature { --audit-color: #10b981; --audit-bg: #d1fae5; }
.audit-cat-correction { --audit-color: #f59e0b; --audit-bg: #fef3c7; }
.audit-cat-user { --audit-color: #8b5cf6; --audit-bg: #ede9fe; }
.audit-cat-review { --audit-color: #3b82f6; --audit-bg: #dbeafe; }
.audit-cat-system { --audit-color: #6b7280; --audit-bg: #f3f4f6; }
.audit-cat-other { --audit-color: #9ca3af; --audit-bg: #f9fafb; }

.audit-border { border-left-color: var(--audit-color) !important; }
.audit-text { color: var(--audit-color); }
.audit-badge { background-color: var(--audit-color); color: white; }
.audit-bg { background-color: var(--audit-bg); }
.audit-btn { color: var(--audit-color); border-color: var(--audit-color); }
.audit-btn:hover { background-color: var(--audit-bg); }

/* Table column widths */
.w-30p { width: 30%; }

.form-label-uppercase {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #00205C;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
