/* Explain: Styles for the settings menu, including background and cursor customization. */
/* Oreo settings menu + per-device custom background */

.custom-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--background-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

.home-view {
    position: relative;
}

.home-fabs {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    gap: 0.5rem;
}

.settings-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: var(--text-color);
    font-size: 1rem;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.settings-fab:hover {
    background: var(--surface-hover);
    border-color: var(--link-color);
    transform: rotate(35deg);
}

.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.6);
}

.settings-modal[hidden] {
    display: none !important;
}

.settings-card {
    width: min(28rem, 100%);
    max-height: calc(100svh - 2rem);
    overflow-y: auto;
    padding: 1.1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
}

.settings-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.settings-head-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--link-color);
}

.settings-head strong {
    flex: 1 1 auto;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
}

.settings-subtitle {
    margin: 0 0 0.4rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.settings-hint {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.settings-bg-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: var(--background-color);
    background-image: linear-gradient(135deg, #1a1a1a, #000000 70%);
    background-size: cover;
    background-position: center;
}

.settings-bg-label {
    margin: 0.6rem 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.settings-actions .oreo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.settings-actions .oreo-btn i {
    color: var(--link-color);
}

.settings-upload {
    cursor: pointer;
}

.settings-status {
    margin: 0.9rem 0 0;
    min-height: 1.2rem;
    color: var(--link-color);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}

.settings-cursor-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-cursor-thumb {
    flex: none;
    width: 5rem;
    height: 5rem;
    border: 1px dashed var(--border-color);
    border-radius: 0.75rem;
    background-color: var(--background-color);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40px 40px;
}

.settings-cursor-info {
    flex: 1 1 auto;
    min-width: 0;
}

.settings-cursor-info .settings-bg-label {
    margin: 0;
    text-align: left;
}

html.oreo-cursor-active,
html.oreo-cursor-active * {
    cursor: var(--oreo-cursor) !important;
}

@media (max-width: 480px) {
    .home-fabs {
        top: 0.75rem;
        right: 0.75rem;
    }
}