/* Supported USB devices — card grid (RGBJunkie for Windows theme) */

.rgbj-supported-page {
    max-width: 75rem;
}

.rgbj-sd-filters.card {
    border-color: var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

.sd-device-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    padding: 1rem;
    background: var(--bs-body-bg);
}

.sd-device-grid {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 23.5rem), 1fr));
    gap: 1rem;
}

@media (min-width: 576px) {
    .sd-device-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 25rem), 1fr));
    }
}

@media (min-width: 1200px) {
    .sd-device-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 26.5rem), 1fr));
    }
}

.sd-device-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    min-width: 0;
    padding: 1rem 1rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.625rem;
    background: linear-gradient(165deg, rgba(0, 240, 255, 0.05) 0%, rgba(0, 0, 0, 0.18) 100%);
    background-color: var(--bs-tertiary-bg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    gap: 0.65rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sd-device-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
    transform: translateY(-1px);
}

.sd-device-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex-shrink: 0;
}

.sd-device-card__thumb {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    box-sizing: border-box;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sd-device-card__thumb img {
    width: 100%;
    height: 100%;
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.sd-device-card__hero {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sd-device-card__head-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.sd-device-card__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    color: var(--bs-emphasis-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
}

.sd-card-share {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.2rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--bs-info) !important;
    opacity: 1 !important;
}

.sd-card-share__icon {
    font-size: 1.35rem;
    line-height: 1;
}

.sd-card-share:hover {
    color: #c8f7ff !important;
    background: rgba(0, 240, 255, 0.12);
}

.sd-device-card__sheet {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sd-meta-grid {
    display: grid;
    grid-template-columns: 6.75rem minmax(0, 1fr);
    column-gap: 0.7rem;
    row-gap: 0.45rem;
    align-items: start;
}

.sd-mlabel {
    margin: 0;
    padding-top: 0.12rem;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.sd-mval {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    font-weight: 400;
    color: var(--bs-body-color);
    min-width: 0;
    overflow-wrap: anywhere;
}

.sd-tech-block {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
}

.sd-meta-grid--tech {
    padding: 0.5rem 0.65rem 0.55rem;
    grid-template-columns: 5rem minmax(0, 1fr);
    column-gap: 0;
    row-gap: 0.25rem;
}

.sd-pids-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.45rem;
    margin-top: 0.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sd-device-card__pids {
    flex: 1 1 auto;
    min-height: 3.25rem;
    max-height: 10.5rem;
    overflow: auto;
    padding: 0.45rem 0.55rem;
    border-radius: 0.4375rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.74rem;
    line-height: 1.42;
}

.sd-device-card__shop {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sd-device-card__shop .sd-amazon-link {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    border-radius: 0.5625rem;
    background: #2c2c30;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sd-device-card__shop .sd-amazon-link:hover {
    background: #36363c;
    border-color: rgba(0, 240, 255, 0.35);
}

.sd-amazon-link-text {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
}

.sd-amazon-logo-img {
    height: 20px;
    width: auto;
    max-width: 86px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.sd-mono {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.82em;
}

.sd-pid-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
    margin-top: 0.32rem;
}

.sd-pid-row:first-child {
    margin-top: 0;
}

.sd-pid-pill {
    display: inline-block;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
}

.sd-pid-pill--0 {
    background: rgba(0, 240, 255, 0.15);
    color: #b8f4ff;
    border: 1px solid rgba(0, 240, 255, 0.35);
}

.sd-pid-pill--1 {
    background: rgba(253, 126, 20, 0.22);
    color: #ffd4a8;
    border: 1px solid rgba(253, 126, 20, 0.38);
}

.sd-pid-pill--2 {
    background: rgba(220, 53, 69, 0.22);
    color: #ffb3bc;
    border: 1px solid rgba(220, 53, 69, 0.35);
}

.sd-pid-name {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.7rem;
}

.sd-muted {
    color: var(--bs-secondary-color);
}

.sd-device-card.sd-permalink-target {
    scroll-margin-top: 5rem;
    border-color: rgba(0, 240, 255, 0.55) !important;
    box-shadow: inset 3px 0 0 0 rgba(0, 240, 255, 0.85);
    background: rgba(0, 240, 255, 0.08) !important;
}

@keyframes sd-card-flash {
    0% {
        box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.65);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
    }
}

.sd-row-flash {
    animation: sd-card-flash 1.4s ease-out 1;
}

.sd-view-tabs .nav-link {
    color: var(--bs-secondary-color);
    border: 1px solid transparent;
}

.sd-view-tabs .nav-link.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.35);
    color: var(--bs-emphasis-color);
}

.sd-validated-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #9ef0c8;
    background: rgba(25, 135, 84, 0.22);
    border: 1px solid rgba(25, 135, 84, 0.45);
    vertical-align: middle;
}

.sd-validated-badge--inline {
    margin-left: 0.35rem;
}

.sd-experimental-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #ffd98a;
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.45);
    vertical-align: middle;
}

.sd-experimental-badge--inline {
    margin-left: 0.35rem;
}

.sd-admin-device-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sd-admin-row {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    background: var(--bs-body-bg);
}

.sd-admin-row--validated {
    border-color: rgba(25, 135, 84, 0.45);
    background: rgba(25, 135, 84, 0.06);
}

.sd-admin-row--experimental {
    border-color: rgba(255, 193, 7, 0.45);
    background: rgba(255, 193, 7, 0.06);
}

.sd-admin-row--busy {
    opacity: 0.65;
}

.sd-admin-row__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
}

.sd-admin-row__head .sd-admin-status {
    width: auto;
    min-width: 9.5rem;
    margin-left: auto;
}

.sd-admin-row__toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.sd-admin-row__name {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.sd-admin-row__meta {
    margin-bottom: 0.5rem;
}

.sd-admin-notes:disabled {
    opacity: 0.55;
}
