﻿
:root {
    --sd-blue: #063A83;
    --sd-blue-50: rgba(223, 230, 238, 0.5);
    --sd-gray-700: #344054;
    --sd-gray-600: #475467;
    --sd-gray-100: #f4f4f4;
    --sd-divider: #ccc;
}

#downloadStreamDataBtn.loading {
    background-color: rgba(0, 0, 0, 0.05); /* lightened look */
    pointer-events: none; /* prevent double-clicks */
    opacity: 0.8;
}

.stream-name-click:hover {
    text-decoration: underline dotted;
    cursor: pointer;
}


.sd-hidden {
    display: none !important;
}

.sd-popup-body {
    font-family: 'Nunito Sans', sans-serif;
    width: 100%;
}

/* header */
.sd-header {
    display: flex;
    justify-content: end;
    align-items: center;
    padding: 0 16px;
}

.sd-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sd-blue);
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.sd-icon-click {
    cursor: pointer;
}

/* section spacing + label */
.sd-section {
    padding: 0 16px;
}

.sd-label {
    color: var(--sd-gray-700);
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    margin-bottom: .3em;
    display: inline-block;
}

.sd-rel {
    position: relative;
    margin: 0 auto;
}

.sd-stream-search {
    margin-top: .5rem;
    width: 100%;
}

.sd-help {
    color: var(--sd-gray-600);
    font-size: 14px;
    line-height: 20px;
}

/* divider */
.sd-hr {
    border-color: var(--sd-divider);
    margin: 1.2rem 16px;
}

/* button row */
.sd-row {
    display: flex;
    margin-bottom: 1rem;
    padding: 0 16px;
}

/* buttons */
.sd-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid transparent;
    background: transparent;
    color: var(--sd-blue);
}

.sd-btn--primary {
    background-color: var(--sd-blue);
    color: #fff;
    border-color: #fff;
}

.sd-btn--outline {
    background-color: transparent;
    color: var(--sd-blue);
    border-color: var(--sd-blue);
}

.sd-btn img.sd-icon-20 {
    height: 20px;
    width: 20px;
    object-fit: contain;
}

/* study section */
.sd-h4 {
    margin: 0 0 .5rem 0;
    padding: 0 8px;
    color: var(--sd-gray-700);
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}

.sd-actions {
    display: flex;
    gap: .5rem;
    padding: 0 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.sd-btn--soft {
    background-color: var(--sd-blue-50);
    color: var(--sd-blue);
    border-color: var(--sd-blue);
}

/* spinner inside button */
.sd-spinner {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    z-index: 2;
}

/* stream list */
.sd-list-wrap {
    padding-bottom: 4em;
    max-height: 320px;
    overflow: scroll;
}

.sd-h4-sm {
    margin: 0 0 .5rem 0;
    padding: 0 8px;
    color: var(--sd-gray-700);
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
}

.sd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.sd-thead {
    text-align: left;
    background-color: var(--sd-gray-100);
}

.sd-th {
    padding: .5rem;
    color: var(--sd-gray-600);
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
}

/* rows added from JS */
.sd-tr {
    border-bottom: 1px solid #ddd;
    background-color: #fff;
}

.sd-td {
    padding: .4rem;
}

.sd-td-center {
    text-align: center;
}

.sd-stream-name {
    font-size: 11px;
}

.sd-row-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sd-remove {
    margin-left: auto;
    padding: 2px;
    font-size: 14px;
    border: none;
    background: none;
    color: red;
    line-height: 1;
    cursor: pointer;
}

/* simple utility */
.sd-mx-8 {
    padding: 0 8px;
}

#btnPointSelect img {
    filter: invert(0%) sepia(35%) saturate(2877%) hue-rotate(196deg) brightness(18%) contrast(60%);
}

#btnPointSelect.active img {
    filter: brightness(100%) invert(0%);
}

#btnAreaSelect img {
    filter: invert(0%) sepia(35%) saturate(2877%) hue-rotate(196deg) brightness(18%) contrast(60%);
}

#btnAreaSelect.active img {
    filter: brightness(0%) invert(100%);
}