html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-ui__content {
    display: inline-block;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
    background-color: #ffffff;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 1px hsla(0, 0%, 100%, 0.05), 0 0 0 1px hsla(215, 95%, 50%, 0.2), 0 0 0 8px hsla(215, 95%, 50%, 0.05);
}

    .loading-progress circle {
        fill: none;
        stroke: #d9d9d9;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: 250px;
            stroke-dashoffset: calc(250px - (250px * var(--blazor-load-percentage)) / 100);
            transition: stroke-dashoffset 1s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 1.7rem;
    top: 48%;
    transform: translateY(-50%);
}

    .loading-progress-text::after {
        content: "@((int)Math.Round(progress.LoadPercentage))%";
    }

code {
    color: #c02d76;
}




/* Table Styling  STARTS HERE*/
.report-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 8px;
    background: white;
    /* Ensure table doesn't hide popping images */
    position: relative;
}

    .report-table thead th {
        background-color: #2c3e50;
        color: white;
        padding: 15px;
        text-transform: uppercase;
        font-size: 0.85rem;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .report-table tbody tr.main-row {
        border-bottom: 1px solid #eee;
    }

        .report-table tbody tr.main-row:hover {
            background-color: #f8f9fa;
        }

    .report-table td {
        padding: 12px 15px;
        vertical-align: middle;
        color: #555;
    }

/* --- NEW THUMBNAIL LOGIC --- */

/* Wrapper handles the anchoring of the popup */
.thumb-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 5px;
}

/* The small thumbnail */
.table-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    border: 1px solid #ddd;
    transition: transform 0.1s;
}

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

/* The Expanded Image (Popup) */
.img-expanded-popover {
    position: absolute;
    top: -5px; /* Slight offset to cover the original thumb border */
    left: -5px;
    width: 300px; /* Base size for expanded image */
    max-width: none; /* Allow it to overflow the table cell */
    height: auto;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 1px solid #ccc;
    background: white;
    z-index: 999; /* Sit on top of everything */
    cursor: zoom-out;
    animation: popIn 0.15s ease-out;
}

/* Invisible Click Guard (The "Click outside" detector) */
.click-guard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* No dimming */
    z-index: 998; /* Just below the image */
    cursor: default;
}

/* Utility Styles */
.btn-expand {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

    .btn-expand.active {
        background-color: #3498db;
        color: white;
        transform: rotate(90deg);
        border-color: #3498db;
    }

.model-tag {
    display: inline-block;
    background: #eef2f7;
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 2px;
    border: 1px solid #dae1e7;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* --- NEW: DETAIL ROW & SPEC TABLE STYLES --- */
.detail-row {
    background-color: #fcfcfc;
    box-shadow: inset 0 3px 6px -5px rgba(0,0,0,0.1);
}

.detail-wrapper {
    padding: 20px;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #3498db;
    border-bottom: 2px solid #eaeff5;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* Technical Spec Table */
.spec-table {
    width: 100%;
    font-size: 0.9rem;
    border: 1px solid #eef2f7;
}

    .spec-table td {
        padding: 8px 12px;
        border-bottom: 1px solid #eef2f7;
    }

    .spec-table tr:last-child td {
        border-bottom: none;
    }

.spec-key {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    width: 40%;
}

.spec-val {
    color: #333;
}

.description-container.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Show only 1 lines when collapsed */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.description-container.expanded {
    display: block;
    height: auto;
    opacity: 1;
}
/* 1. Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-bottom: 0;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Grey */
    transition: .4s;
    border-radius: 20px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #0d6efd; /* Bootstrap Blue */
}

    input:checked + .slider:before {
        transform: translateX(20px);
    }

/* 2. Helper Utilities */
.user-select-none {
    user-select: none;
}

/* 3. Description Collapse styles */
.description-container.collapsed {
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

    .description-container.collapsed::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 30px;
        background: linear-gradient(transparent, #ffffff);
    }

.description-container.expanded {
    max-height: none;
    overflow: visible;
}

/* Custom Orange Button */
.btn-outline-orange {
    color: #fd7e14;
    border-color: #fd7e14;
}

    .btn-outline-orange:hover {
        background-color: #fd7e14;
        color: white;
    }