/* Utility Classes for Common UI Patterns */

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

/* Button Groups */
.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Table Enhancements */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-style .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Form Enhancements */
.input-group-merge .input-group-text {
    border-right: 0;
    background-color: transparent;
}

.input-group-merge .form-control {
    border-left: 0;
}

.input-group-merge .form-control:focus {
    box-shadow: none;
    border-color: #d9dee3;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.dark-style .loading-overlay {
    background-color: rgba(40, 44, 52, 0.8);
}

/* Text Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Spacing Utilities */
.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

/* Border Utilities */
.border-dashed {
    border-style: dashed !important;
}

.border-dotted {
    border-style: dotted !important;
}

/* Animation Utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

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

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

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

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

/* Responsive Utilities */
@media (max-width: 767.98px) {
    .mobile-stack > * {
        margin-bottom: 0.5rem;
    }
    
    .mobile-stack > *:last-child {
        margin-bottom: 0;
    }
    
    .mobile-center {
        text-align: center;
    }
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.active {
    background-color: #28a745;
}

.status-dot.inactive {
    background-color: #dc3545;
}

.status-dot.pending {
    background-color: #ffc107;
}

/* Card Variants */
.card-flush {
    border: 0;
    box-shadow: none;
}

.card-elevated {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-bordered {
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Height Utilities */
.max-height-200 {
    max-height: 200px;
}

.max-height-300 {
    max-height: 300px;
}

.max-height-400 {
    max-height: 400px;
}

.overflow-auto {
    overflow: auto;
}

.overflow-hidden {
    overflow: hidden;
}

/* Text Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.min-width-0 {
    min-width: 0;
}

/* Flex Utilities */
.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-grow-1 {
    flex-grow: 1;
}

/* Dark mode adjustments */
.dark-style .card-bordered {
    border-color: rgba(255, 255, 255, 0.125);
}