/* Copyright (c) 2025 ClayBuilder LLC. All rights reserved. */
/* No use, distribution, or modification is permitted without prior written permission. */

/* ===================================================================
   Earthy / parchment-glass pill treatment for navbar button trays.
   Layout, sizes, spacing kept identical to legacy — only visuals change.
   =================================================================== */

/* Container for the button group */
.btn-icon-group {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    background: var(--cb-ui-glass-bg) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    padding: 10px;
    border-radius: 18px;
    width: 140px;
    margin: auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 1px 2px rgba(60, 40, 20, 0.05),
        0 10px 26px rgba(60, 40, 20, 0.10);
    border: 1px solid var(--cb-ui-glass-border);
}

/* Container for the right-hand view-switcher group */
.btn-icon-group-2 {
    position: fixed;
    right: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 15px;
    grid-area: views;
    background: var(--cb-ui-glass-bg) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    padding: 10px;
    border-radius: 18px;
    width: fit-content;
    margin: auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 1px 2px rgba(60, 40, 20, 0.05),
        0 10px 26px rgba(60, 40, 20, 0.10);
    border: 1px solid var(--cb-ui-glass-border);
}


/* Floating circle (sliding selection background behind icons) */
.btn-bg {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #fbf3e3 100%);
    border-radius: 50%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 2px 6px rgba(212, 152, 115, 0.25),
        0 6px 18px rgba(60, 40, 20, 0.12);
    border: 1px solid rgba(212, 152, 115, 0.40);
    transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.2s ease, box-shadow 0.3s ease;
    z-index: 0;
}

@media (prefers-color-scheme: dark) {
    .btn-bg {
        background: linear-gradient(135deg, rgba(95, 78, 58, 0.95) 0%, rgba(70, 51, 42, 0.95) 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.10),
            0 2px 6px rgba(0, 0, 0, 0.40),
            0 6px 18px rgba(0, 0, 0, 0.50);
        border-color: var(--lhs-border-strong);
    }
}

/* WCAG 2.1 SC 2.3.3 — honor the user's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
    .btn-bg {
        transition: none;
    }
}

.btn-bg-text {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #fbf3e3 100%);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 2px 6px rgba(212, 152, 115, 0.20),
        0 6px 16px rgba(60, 40, 20, 0.10);
    border: 1px solid rgba(212, 152, 115, 0.35);
    margin-bottom: 1rem;
    cursor: pointer;
    z-index: 0;
    transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
}

.btn-bg-text:hover {
    border-color: rgba(212, 152, 115, 0.60);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 10px rgba(212, 152, 115, 0.30),
        0 10px 24px rgba(60, 40, 20, 0.14);
}

@media (prefers-color-scheme: dark) {
    .btn-bg-text {
        background: linear-gradient(135deg, rgba(95, 78, 58, 0.95) 0%, rgba(70, 51, 42, 0.95) 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.10),
            0 2px 6px rgba(0, 0, 0, 0.40),
            0 6px 16px rgba(0, 0, 0, 0.45);
        border-color: var(--cb-ui-glass-border);
    }

    .btn-bg-text:hover {
        border-color: var(--lhs-border-strong);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            0 3px 10px rgba(212, 181, 137, 0.18),
            0 10px 24px rgba(0, 0, 0, 0.55);
    }
}

.btn-bg-text .btn-content {
    display: inline-block;
    transition: transform 0.2s ease;
}

.btn-bg-text:hover .btn-content {
    transform: scale(1.08);
}

/* Media-library Grid/Table toggle pill */
.btn-icon-group-media {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    background: var(--cb-ui-glass-bg) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    padding: 10px;
    border-radius: 18px;
    width: 150px;
    margin: auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 1px 2px rgba(60, 40, 20, 0.05),
        0 10px 26px rgba(60, 40, 20, 0.10);
    border: 1px solid var(--cb-ui-glass-border);
}

/* Icon buttons — refined hover, calmer scale */
.btn-icon {
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
    color: var(--cb-warm-label-text);
}

.btn-icon:hover {
    transform: scale(1.18);
    color: var(--cb-preview-btn-color);
}

.btn:hover {
    background-color: var(--cb-button-hover-background);
    color: #000000;
}

/* Notification badge — keep its alert role but warm the border to match parchment */
.notification-badge {
    position: absolute;
    bottom: 0px;
    right: -2px;
    background-color: #c0392b;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    border: 2px solid rgba(255, 252, 244, 0.95);
    box-shadow: 0 1px 4px rgba(192, 57, 43, 0.45);
}

@media (prefers-color-scheme: dark) {
    .notification-badge {
        border-color: var(--cb-ui-glass-bg);
    }
}

/* Add right margin to actions dropdown container */
#actions_div {
    margin-right: 8px;
}
