/* Shared Component Styles */
/* Reusable styles for cards, grids, filters, and responsive layouts */
/* 
 * This file contains common CSS classes that can be used across multiple pages
 * to maintain consistent styling and reduce code duplication.
 * 
 * Usage Examples:
 * 
 * 1. Responsive Grid Container:
 *    <div class="grid-container-responsive">
 *      <TelerikGrid ... />
 *    </div>
 * 
 * 2. Enhanced Card:
 *    <TelerikCard Class="card-enhanced">
 *      <CardHeader Class="card-header-enhanced">
 *        <h5 class="card-title-enhanced">Title</h5>
 *      </CardHeader>
 *    </TelerikCard>
 * 
 * 3. Filters:
 *    <div class="filters-container">
 *      <div class="filter-group">
 *        <label class="filter-label">Filter Name</label>
 *        <TelerikDropDownList ... />
 *      </div>
 *    </div>
 * 
 * 4. Grid Section Title:
 *    <h6 class="grid-section-title">Section Name</h6>
 * 
 * 5. Responsive Utilities:
 *    <div class="mobile-only">Shows only on mobile</div>
 *    <div class="desktop-only">Shows only on desktop</div>
 */

/* Grid container with responsive horizontal scrolling */
.grid-container-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Show scroll indicator on mobile */
@media (max-width: 768px) {
    .grid-container-responsive {
        position: relative;
        padding-bottom: 10px;
    }

    .grid-container-responsive::after {
        content: "← Scroll for more columns →";
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #6c757d;
        padding: 0.5rem;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 10%, rgba(255,255,255,1) 90%, rgba(255,255,255,0) 100%);
        position: sticky;
        bottom: 0;
        left: 0;
        width: 100%;
    }

    /* Make card header more compact on mobile */
    .card-header-responsive {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .card-header-responsive .card-title-enhanced {
        font-size: 1rem;
    }

    /* Adjust filters on mobile */
    .filters-container {
        flex-direction: column;
        width: 100%;
    }

    .filters-container > * {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Grid wrapper for horizontal scroll shadow indicators */
.grid-scroll-wrapper {
    position: relative;
    overflow: hidden;
}

.grid-scroll-wrapper::before,
.grid-scroll-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s;
}

.grid-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.grid-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* Improve table readability on small screens */
@media (max-width: 576px) {
    /* Reduce padding in grid cells */
    ::deep .k-grid td {
        padding: 0.375rem !important;
        font-size: 0.875rem;
    }

    ::deep .k-grid th {
        padding: 0.375rem !important;
        font-size: 0.875rem;
    }

    /* Sticky first column on mobile for context */
    ::deep .k-grid tbody tr td:first-child,
    ::deep .k-grid thead tr th:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
}

/* Enhanced card styling */
.card-enhanced {
    margin-bottom: 1rem;
}

.card-header-enhanced {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
}

.card-title-enhanced {
    margin: 0;
    color: #212529;
    font-weight: 600;
}

/* Filter controls styling */
.filters-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #495057;
}

/* Grid section headers */
.grid-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Responsive utilities */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}
