/* Settings rows inside the standard panel (js/preferences.js) */

.preferences-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 14px;
    border-bottom: 1px solid var(--surface-raised);
}

.preferences-row.disabled {
    opacity: 0.45;
}

.preferences-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.preferences-label {
    font-weight: 700;
    font-size: 15px;
}

.preferences-explain {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.35;
}

.preferences-explain:empty {
    display: none;
}

/* Where the value comes from: algemeen, kassa, dit apparaat or standaard */
.preferences-source {
    align-self: flex-start;
    margin-top: 2px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.preferences-source.local {
    background: rgba(59, 111, 216, 0.3);
    color: #c9d8ff;
}

.preferences-control {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preferences-control .status-dot.offline {
    background: var(--offline);
}

.preferences-value {
    color: var(--text-muted);
    font-weight: 600;
}

.preferences-toggle {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: #3a3d47;
    transition: background 0.2s;
}

.preferences-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: translate 0.2s;
}

.preferences-toggle.on {
    background: var(--online);
}

.preferences-toggle.on::after {
    translate: 20px 0;
}

.preferences-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.preferences-swatch.active {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

.preferences-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
}

.preferences-reset:active {
    background: var(--surface-raised);
}

.preferences-reset v-icon {
    width: 14px;
    height: 14px;
}

@media (max-width: 767px), (max-height: 499px) {
    .preferences-row {
        flex-wrap: wrap;
    }
}
