/* =========================================================
   FILE        :: /public/assets/css/modules/tickets/service-orders-widget.css
   MODULE      :: Tickets
   DOMAIN      :: Tickets
   LAYER       :: Presentation Asset
   PURPOSE     :: Enterprise operations overview navigation styling
   OWNER       :: Tickets Domain Authority
   VERSION     :: 9.0.0
   ========================================================= */

/*
|--------------------------------------------------------------------------
| FORCE RENDER MODE
|--------------------------------------------------------------------------
*/

.service-orders-mobile {
    display: none !important;
}

.service-orders-desktop {
    display: block !important;

    overflow: visible !important;
}

/*
|--------------------------------------------------------------------------
| SERVICE ORDERS CONTAINER
|--------------------------------------------------------------------------
*/

.service-orders-container {
    position: relative;

    overflow: visible;

    z-index: 110000;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(235, 253, 246, 0.8));

    border-radius: 12px;

    padding:
        0.85rem 1.25rem;

    border:
        1px solid rgba(34, 211, 238, 0.18);

    backdrop-filter:
        blur(14px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.75),
        0 16px 40px rgba(15, 23, 42, 0.07);
}

.service-orders-container::before {
    content: '';

    position: absolute;

    top: 0.65rem;
    right: 0.85rem;

    width: 3.25rem;
    height: 0.45rem;

    border-radius: 999px;

    background:
        repeating-linear-gradient(
            90deg,
            rgba(34, 211, 238, 0.78) 0 0.38rem,
            transparent 0.38rem 0.62rem
        );

    opacity: 0.72;

    animation: serviceOrdersTelemetry 1.8s steps(5, end) infinite;
}

@keyframes serviceOrdersTelemetry {

    0% {
        clip-path: inset(0 78% 0 0);
    }

    50% {
        clip-path: inset(0 18% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .service-orders-container::before {
        animation: none;
    }
}

/*
|--------------------------------------------------------------------------
| DESKTOP LINK GRID
|--------------------------------------------------------------------------
*/

.service-orders-links {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 0.65rem;

    overflow: visible;
}

.operations-overview-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.operations-overview-heading strong {
    color: #102033;
    font-size: 0.98rem;
    font-weight: 900;
}

.operations-overview-heading span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/*
|--------------------------------------------------------------------------
| CATEGORY ITEM
|--------------------------------------------------------------------------
*/

.category-item {
    position: relative;

    display: inline-flex;

    align-items: center;

    z-index: 110100;
}

/*
|--------------------------------------------------------------------------
| SERVICE ORDER LINK
|--------------------------------------------------------------------------
*/

.service-order-link {
    color: #064e3b !important;

    font-weight: 750;

    text-decoration: none !important;

    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.24);

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}

.service-order-link:hover {
    color: #102033 !important;
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);

    text-decoration: none !important;
}

/*
|--------------------------------------------------------------------------
| FLOATING OVERLAY
|--------------------------------------------------------------------------
*/

.details-popup {
    position: absolute;

    top: calc(100% + 6px);

    left: 0;

    min-width: 340px;

    max-width: 440px;

    max-height: 480px;

    overflow-y: auto;

    padding: 0.75rem;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.97);

    border:
        1px solid rgba(34, 211, 238, 0.22);

    box-shadow:
        0 24px 60px rgba(15,23,42,0.16),
        0 8px 20px rgba(15,23,42,0.08);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    z-index: 110200;

    transition:
    opacity 0.08s linear,
    visibility 0.08s linear;
}

/*
|--------------------------------------------------------------------------
| JAVASCRIPT VISIBILITY STATE
|--------------------------------------------------------------------------
*/

.details-popup--visible {
    opacity: 1 !important;

    visibility: visible !important;

    pointer-events: auto !important;
}

/*
|--------------------------------------------------------------------------
| POPUP LIST
|--------------------------------------------------------------------------
*/

.details-popup ul {
    margin: 0 !important;

    padding: 0 !important;

    list-style: none !important;
}

.details-popup li {
    list-style: none !important;

    margin: 0 !important;

    padding: 0 !important;
}

.details-popup li + li {
    margin-top: 0.35rem !important;
}

/*
|--------------------------------------------------------------------------
| POPUP LINKS
|--------------------------------------------------------------------------
*/

.details-popup a {
    display: flex !important;

    align-items: center !important;

    justify-content: space-between !important;

    gap: 1rem !important;

    width: 100% !important;

    padding:
        0.7rem 0.85rem !important;

    border-radius: 10px !important;

    color: #102033 !important;

    text-decoration: none !important;

    font-weight: 750 !important;

    line-height: 1.2 !important;

    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.details-popup a:hover {
    background: rgba(20, 184, 166, 0.12) !important;

    color: #064e3b !important;

    text-decoration: none !important;
}

/*
|--------------------------------------------------------------------------
| STATUS BADGES
|--------------------------------------------------------------------------
*/

.status-badge {
    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    min-width: 28px !important;

    height: 28px !important;

    padding:
        0 0.65rem !important;

    border-radius: 999px !important;

    font-size: 0.8rem !important;

    font-weight: 700 !important;

    line-height: 1 !important;

    color: #ffffff !important;

    background: #64748b !important;

    flex-shrink: 0 !important;
}

/*
|--------------------------------------------------------------------------
| STATUS COLORS
|--------------------------------------------------------------------------
*/

.status-solved {
    background: #198754 !important;
}

.status-invoiced {
    background: #0d6efd !important;
}

.status-closed {
    background: #6c757d !important;
}

.status-in-progress {
    background: #ffc107 !important;

    color: #000000 !important;
}

.status-ready-to-invoice {
    background: #0ea5e9 !important;
}

.status-new {
    background: #8b5cf6 !important;
}

.status-ongoing {
    background: #f97316 !important;
}

.status-cancelled-by-customer {
    background: #dc3545 !important;
}

.status-closed-without-resolution {
    background: #475569 !important;
}

.status-quote-requested {
    background: #14b8a6 !important;
}

/*
|--------------------------------------------------------------------------
| MOBILE OVERRIDE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .service-orders-desktop {
        display: none !important;
    }

    .service-orders-mobile {
        display: block !important;
    }

    .details-popup {
        display: none !important;
    }
}
