/* 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;
}

/* House view (Shared/Components/HouseViewer.razor, houseViewer.js) */

.house-viewer {
    position: relative;
    height: clamp(320px, 55vh, 640px);
    border-radius: 8px;
    overflow: hidden;
    background: #05070d;
    border: 1px solid var(--mud-palette-lines-default);
}

.house-viewer-canvas {
    position: absolute;
    inset: 0;
    touch-action: none;
}

.house-viewer-canvas canvas {
    display: block;
    cursor: grab;
}

.house-viewer-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 6px;
    background: rgba(20, 22, 28, .72);
    backdrop-filter: blur(4px);
}

.house-viewer-note,
.house-viewer-error {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .8rem;
    color: #e8eaf0;
    background: rgba(20, 22, 28, .72);
}

.house-viewer-error {
    background: rgba(140, 30, 30, .85);
}

.house-viewer-label {
    position: absolute;
    display: none;
    pointer-events: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: .8rem;
    white-space: nowrap;
    color: #fff;
    background: rgba(0, 0, 0, .75);
}

.house-viewer-panel {
    position: absolute;
    left: 8px;
    bottom: 8px;
    max-width: min(380px, calc(100% - 16px));
    padding: 8px 12px;
    border-radius: 8px;
    color: #e8eaf0;
    background: rgba(20, 22, 28, .82);
    backdrop-filter: blur(4px);
}

.house-viewer-hint {
    color: rgba(232, 234, 240, .7);
}
