/* Lights page (Pages/Lights.razor) */

.light-card {
    transition: border-color .15s ease, box-shadow .15s ease;
    height: 100%;
}

.light-card-selected {
    border-color: var(--mud-palette-primary) !important;
    box-shadow: 0 0 0 1px var(--mud-palette-primary);
}

.light-card-offline {
    opacity: .6;
}

.light-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 6px;
    background: var(--mud-palette-error);
}

.light-dot-online {
    background: var(--mud-palette-success);
}

.light-swatch {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .35s ease, box-shadow .35s ease;
}

.light-swatch:disabled {
    cursor: not-allowed;
}

.light-swatch:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 3px;
}

.light-swatch-icon {
    color: rgba(0, 0, 0, .45);
}

.light-swatch-effect {
    animation: light-pulse 2.4s ease-in-out infinite;
}

@keyframes light-pulse {
    50% { transform: scale(.92); }
}

.light-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.light-palette-chip {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .2);
    cursor: pointer;
    padding: 0;
}

.light-palette-chip:hover,
.light-palette-chip:focus-visible {
    transform: scale(1.12);
    outline: none;
    border-color: var(--mud-palette-text-primary);
}

.light-kelvin-bar {
    height: 10px;
    border-radius: 5px;
    margin: 0 2px 4px;
}

.light-preset {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    padding-right: 2px;
}

.light-preset:hover,
.light-preset:focus-within {
    border-color: var(--mud-palette-primary);
}

.light-preset-apply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 10px;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    font-size: .875rem;
    cursor: pointer;
}

.light-preset-apply:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    border-radius: 14px;
}

.light-preset-dots {
    display: inline-flex;
}

.light-preset-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .35);
    margin-left: -4px;
}

.light-preset-dots span:first-child {
    margin-left: 0;
}

.light-effect-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
