/* utilities.css - Utility classes for HSE Calculator */

/* ===== SPACING UTILITIES ===== */
/* Margin Top */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* Margin Bottom */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

/* Margin Left & Right */
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* ===== DISPLAY UTILITIES ===== */
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }
.d-none { display: none !important; }

@media (min-width: 768px) {
    .d-md-block { display: block !important; }
    .d-md-none { display: none !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-lg-block { display: block !important; }
    .d-lg-none { display: none !important; }
    .d-lg-flex { display: flex !important; }
}

/* ===== FLEXBOX UTILITIES ===== */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 !important; }
.flex-auto { flex: 1 1 auto !important; }
.flex-none { flex: none !important; }

.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }

.align-start { align-items: flex-start !important; }
.align-end { align-items: flex-end !important; }
.align-center { align-items: center !important; }
.align-baseline { align-items: baseline !important; }
.align-stretch { align-items: stretch !important; }

/* ===== TEXT UTILITIES ===== */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.text-nowrap { white-space: nowrap !important; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* Font Weight */
.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-medium { font-weight: 500 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: 800 !important; }

/* Font Size */
.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }
.fs-sm { font-size: 0.875rem !important; }
.fs-xs { font-size: 0.75rem !important; }

/* Text Colors */
.text-primary { color: #2c5aa0 !important; }
.text-secondary { color: #4caf50 !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #343a40 !important; }
.text-muted { color: #6c757d !important; }
.text-white { color: #ffffff !important; }

/* Background Colors */
.bg-primary { background-color: #2c5aa0 !important; }
.bg-secondary { background-color: #4caf50 !important; }
.bg-success { background-color: #28a745 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #343a40 !important; }
.bg-white { background-color: #ffffff !important; }
.bg-transparent { background-color: transparent !important; }

/* ===== BORDER UTILITIES ===== */
.border { border: 1px solid #dee2e6 !important; }
.border-top { border-top: 1px solid #dee2e6 !important; }
.border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.border-left { border-left: 1px solid #dee2e6 !important; }
.border-right { border-right: 1px solid #dee2e6 !important; }

.border-0 { border: 0 !important; }
.border-top-0 { border-top: 0 !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.border-left-0 { border-left: 0 !important; }
.border-right-0 { border-right: 0 !important; }

.border-primary { border-color: #2c5aa0 !important; }
.border-secondary { border-color: #4caf50 !important; }
.border-success { border-color: #28a745 !important; }
.border-danger { border-color: #dc3545 !important; }
.border-warning { border-color: #ffc107 !important; }
.border-info { border-color: #17a2b8 !important; }
.border-light { border-color: #f8f9fa !important; }
.border-dark { border-color: #343a40 !important; }
.border-white { border-color: #ffffff !important; }

.rounded { border-radius: 0.25rem !important; }
.rounded-sm { border-radius: 0.125rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 1rem !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill { border-radius: 50rem !important; }

/* ===== SHADOW UTILITIES ===== */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; }

/* ===== WIDTH & HEIGHT UTILITIES ===== */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

/* ===== VISIBILITY UTILITIES ===== */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* ===== POSITION UTILITIES ===== */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-0 { left: 0 !important; }
.right-0 { right: 0 !important; }

/* ===== OPACITY UTILITIES ===== */
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ===== CURSOR UTILITIES ===== */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-wait { cursor: wait !important; }
.cursor-move { cursor: move !important; }

/* ===== OVERFLOW UTILITIES ===== */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }
.overflow-x-hidden { overflow-x: hidden !important; }
.overflow-y-hidden { overflow-y: hidden !important; }

/* ===== PRINT UTILITIES ===== */
@media print {
    .print-only { display: block !important; }
    .no-print { display: none !important; }
    .print-break-before { break-before: page !important; }
    .print-break-after { break-after: page !important; }
    .print-break-inside-avoid { break-inside: avoid !important; }
}

/* ===== Z-INDEX UTILITIES ===== */
.z-0 { z-index: 0 !important; }
.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }
.z-4 { z-index: 4 !important; }
.z-5 { z-index: 5 !important; }
.z-10 { z-index: 10 !important; }
.z-100 { z-index: 100 !important; }
.z-1000 { z-index: 1000 !important; }

/* ===== SCROLLBAR UTILITIES ===== */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== LAYER UTILITIES ===== */
.layer-base { z-index: 1; }
.layer-dropdown { z-index: 1000; }
.layer-sticky { z-index: 1020; }
.layer-fixed { z-index: 1030; }
.layer-modal-backdrop { z-index: 1040; }
.layer-modal { z-index: 1050; }
.layer-popover { z-index: 1060; }
.layer-tooltip { z-index: 1070; }

/* ===== ANIMATION UTILITIES ===== */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in;
}

.animate-slide-up {
    animation: slideInUp 0.3s ease-out;
}

.animate-slide-down {
    animation: slideInDown 0.3s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.3s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-shadow {
    transition: box-shadow 0.2s ease;
}

.hover-shadow:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.hover-grow {
    transition: transform 0.2s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* ===== RESPONSIVE TEXT ===== */
.text-responsive {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.heading-responsive {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* ===== ASPECT RATIO ===== */
.aspect-ratio-16x9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4x3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1x1 {
    aspect-ratio: 1 / 1;
}

.aspect-ratio-2x1 {
    aspect-ratio: 2 / 1;
}

/* ===== GRID GAP UTILITIES ===== */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* ===== OBJECT FIT ===== */
.object-cover { object-fit: cover !important; }
.object-contain { object-fit: contain !important; }
.object-fill { object-fit: fill !important; }
.object-none { object-fit: none !important; }
.object-scale-down { object-fit: scale-down !important; }

/* ===== LINE CLAMP ===== */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* ===== FOCUS UTILITIES ===== */
.focus-ring:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(44, 90, 160, 0.25);
}

.focus-ring-primary:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(44, 90, 160, 0.25);
}

.focus-ring-success:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

.focus-ring-danger:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* ===== SELECTION ===== */
::selection {
    background-color: rgba(44, 90, 160, 0.2);
    color: inherit;
}

.select-none {
    user-select: none;
}

.select-text {
    user-select: text;
}

.select-all {
    user-select: all;
}
