﻿/* ============================================================
   _LayoutShared.css  —  Components shared across all layouts
   Overrides, toolbar components, theme switcher, buttons.
   Load AFTER _LayoutThemes.css, BEFORE layout-specific CSS.
   ============================================================ */

/* ==========================================================
   1. OVERRIDES (style.css / Bootstrap reset)
   ========================================================== */
html {
    height: auto !important;
}

body {
    display: block !important;
    flex-direction: unset !important;
    height: auto !important;
    font-family: 'Inter', 'Open Sans', Arial, sans-serif !important;
    background-color: var(--fx-outer-bg) !important;
}

#layout-wrapper footer.fx-footer {
    height: auto !important;
    background-color: transparent !important;
}

/* ==========================================================
   2. CONTENT PANEL BASE
   ========================================================== */
.fx-content {
    flex: 1;
    min-width: 0;
    background: var(--fx-content-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fx-content-body {
    flex: 1;
    padding: 16px;
}

.fx-footer {
    flex-shrink: 0;
    min-height: var(--fx-bottom-h);
    box-sizing: border-box;
    padding: 0 24px;
    font-size: 12px;
    color: var(--fx-text-muted);
    /*border-top: 1px solid var(--fx-bottom-border);*/
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================
   3. TOOLBAR COMPONENTS (icons, separator, user, caret)
   ========================================================== */

/* ── Action icons ── */
.fx-toolbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--fx-r);
    color: var(--fx-text-muted) !important;
    text-decoration: none !important;
    font-size: 15px;
    transition: background var(--fx-speed), color var(--fx-speed);
    position: relative;
}

    .fx-toolbar-icon:hover {
        background: var(--fx-hover);
        color: var(--fx-text-mid) !important;
        text-decoration: none !important;
    }

/* ── Separator ── */
.fx-toolbar-sep {
    width: 1px;
    height: 24px;
    background: var(--fx-bottom-border);
    margin: 0 6px;
    flex-shrink: 0;
}

/* ── User trigger ── */
.fx-toolbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 8px;
    border-radius: var(--fx-r);
    text-decoration: none !important;
    color: var(--fx-text) !important;
    transition: background var(--fx-speed);
    cursor: pointer;
}

    .fx-toolbar-user:hover {
        background: var(--fx-hover) !important;
        text-decoration: none !important;
        color: var(--fx-text) !important;
    }

    .fx-toolbar-user::after {
        display: none; /* hide BS caret */
    }

/* ── Avatar circle ── */
.fx-toolbar-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--fx-avatar);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .5px;
}

/* ── User info (name + role) ── */
.fx-toolbar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fx-toolbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.fx-toolbar-user-role {
    font-size: 10px;
    color: var(--fx-text-muted);
    line-height: 1.2;
}

/* ── User caret ── */
.fx-toolbar-caret {
    font-size: 9px;
    color: var(--fx-text-muted);
    margin-left: 2px;
    transition: transform var(--fx-speed);
}

.fx-toolbar-user[aria-expanded="true"] .fx-toolbar-caret {
    transform: rotate(180deg);
}

/* ==========================================================
   4. DROPDOWNS (user menu, theme menu)
   ========================================================== */

/* ── Dropdown container base ── */
.fx-toolbar-dropdown {
    border-radius: var(--fx-r) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10) !important;
    border: 1px solid var(--fx-bottom-border) !important;
    padding: 6px !important;
    background: var(--fx-sidebar-bg) !important;
}

    .fx-toolbar-dropdown li {
        background: transparent !important;
        border: none !important;
        padding-left: 0 !important;
    }

    /* ── Dropdown divider ── */
    .fx-toolbar-dropdown .dropdown-divider {
        margin: 4px 8px !important;
        border-color: var(--fx-bottom-border) !important;
        opacity: 1 !important;
    }

/* ── Dropdown items ── */
.fx-toolbar-dropdown-item {
    font-size: 13px !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    color: var(--fx-nav-color) !important;
    background: transparent !important;
    transition: background var(--fx-speed), color var(--fx-speed) !important;
}

    .fx-toolbar-dropdown-item:hover {
        background: var(--fx-hover) !important;
        color: var(--fx-text) !important;
    }

    .fx-toolbar-dropdown-item i {
        width: 18px;
        text-align: center;
        margin-right: 6px;
        font-size: 13px;
        color: var(--fx-icon);
        transition: color var(--fx-speed);
    }

    .fx-toolbar-dropdown-item:hover i {
        color: var(--fx-text-mid);
    }

    .fx-toolbar-dropdown-item.active {
        font-weight: 600;
        color: var(--fx-text) !important;
    }

    /* ── Sign-out item accent ── */
    .fx-toolbar-dropdown-item.fx-signout:hover {
        color: #c0453a !important;
    }

        .fx-toolbar-dropdown-item.fx-signout:hover i {
            color: #c0453a;
        }

/* ==========================================================
   5. THEME SWITCHER
   ========================================================== */
.fx-theme-heading {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fx-text-muted);
    padding: 10px;
}

.fx-theme-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--fx-border);
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.fx-theme-option {
    display: flex !important;
    align-items: center;
}

    .fx-theme-option.active {
        font-weight: 600;
        color: var(--fx-text) !important;
    }

        .fx-theme-option.active::after {
            content: "\f00c";
            font-family: FontAwesome;
            font-size: 11px;
            margin-left: auto;
            color: var(--fx-avatar);
        }

/* ==========================================================
   6. BUTTONS — modern, semi-transparent, theme-aware
   ========================================================== */

/* ── Base ── */
.btn {
    font-family: 'Inter', 'Open Sans', Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    letter-spacing: 0.01em;
    border-radius: 8px !important;
    padding: 7px 16px !important;
    border: 1px solid transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

    .btn:focus-visible {
        outline: 2px solid var(--fx-avatar) !important;
        outline-offset: 2px;
        box-shadow: none !important;
    }

.btn-xs {
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
}

.btn-sm {
    font-size: 12px !important;
    padding: 5px 12px !important;
    border-radius: 7px !important;
}

.btn-lg {
    font-size: 15px !important;
    padding: 10px 24px !important;
    border-radius: 10px !important;
}

/* ── Primary ── */
.btn-primary {
    color: #fff !important;
    background-color: rgba(60, 110, 180, 0.70) !important;
    border-color: rgba(60, 110, 180, 0.30) !important;
}

    .btn-primary:hover {
        background-color: rgba(50, 95, 160, 0.85) !important;
        border-color: rgba(50, 95, 160, 0.40) !important;
    }

    .btn-primary:active,
    .btn-primary.active {
        background-color: rgba(40, 80, 140, 0.95) !important;
        border-color: rgba(40, 80, 140, 0.50) !important;
    }

/* ── Secondary ── */
.btn-secondary {
    color: var(--fx-text) !important;
    background-color: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.10) !important;
}

    .btn-secondary:hover {
        color: var(--fx-text) !important;
        background-color: rgba(0, 0, 0, 0.11) !important;
        border-color: rgba(0, 0, 0, 0.16) !important;
    }

    .btn-secondary:active,
    .btn-secondary.active {
        color: var(--fx-text) !important;
        background-color: rgba(0, 0, 0, 0.16) !important;
        border-color: rgba(0, 0, 0, 0.20) !important;
    }

/* ── Success ── */
.btn-success {
    color: #fff !important;
    background-color: rgba(60, 140, 70, 0.68) !important;
    border-color: rgba(60, 140, 70, 0.28) !important;
}

    .btn-success:hover {
        background-color: rgba(50, 125, 60, 0.82) !important;
        border-color: rgba(50, 125, 60, 0.38) !important;
    }

    .btn-success:active,
    .btn-success.active {
        background-color: rgba(40, 110, 50, 0.93) !important;
        border-color: rgba(40, 110, 50, 0.48) !important;
    }

/* ── Danger ── */
.btn-danger {
    color: #fff !important;
    background-color: rgba(195, 65, 55, 0.68) !important;
    border-color: rgba(195, 65, 55, 0.28) !important;
}

    .btn-danger:hover {
        background-color: rgba(180, 55, 45, 0.82) !important;
        border-color: rgba(180, 55, 45, 0.38) !important;
    }

    .btn-danger:active,
    .btn-danger.active {
        background-color: rgba(160, 45, 35, 0.93) !important;
        border-color: rgba(160, 45, 35, 0.48) !important;
    }

/* ── Warning ── */
.btn-warning {
    color: #fff !important;
    background-color: rgba(200, 150, 30, 0.70) !important;
    border-color: rgba(200, 150, 30, 0.28) !important;
}

    .btn-warning:hover {
        background-color: rgba(185, 135, 20, 0.84) !important;
        border-color: rgba(185, 135, 20, 0.38) !important;
    }

    .btn-warning:active,
    .btn-warning.active {
        background-color: rgba(170, 120, 10, 0.93) !important;
        border-color: rgba(170, 120, 10, 0.48) !important;
    }

/* ── Info ── */
.btn-info {
    color: #fff !important;
    background-color: rgba(50, 140, 180, 0.68) !important;
    border-color: rgba(50, 140, 180, 0.28) !important;
}

    .btn-info:hover {
        background-color: rgba(40, 125, 165, 0.82) !important;
        border-color: rgba(40, 125, 165, 0.38) !important;
    }

    .btn-info:active,
    .btn-info.active {
        background-color: rgba(30, 110, 150, 0.93) !important;
        border-color: rgba(30, 110, 150, 0.48) !important;
    }

/* ── Outline Primary ── */
.btn-outline-primary {
    color: var(--fx-text-mid) !important;
    background-color: transparent !important;
    border-color: rgba(60, 110, 180, 0.35) !important;
}

    .btn-outline-primary:hover {
        color: #fff !important;
        background-color: rgba(60, 110, 180, 0.70) !important;
        border-color: rgba(60, 110, 180, 0.30) !important;
    }

    .btn-outline-primary:active,
    .btn-outline-primary.active {
        color: #fff !important;
        background-color: rgba(40, 80, 140, 0.93) !important;
    }

/* ── Outline Secondary ── */
.btn-outline-secondary {
    color: var(--fx-text) !important;
    background-color: transparent !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

    .btn-outline-secondary:hover {
        color: var(--fx-text) !important;
        background-color: rgba(0, 0, 0, 0.06) !important;
        border-color: rgba(0, 0, 0, 0.20) !important;
    }

    .btn-outline-secondary:active,
    .btn-outline-secondary.active {
        color: var(--fx-text) !important;
        background-color: rgba(0, 0, 0, 0.11) !important;
    }

/* ── Disabled state (all variants) ── */
.btn:disabled,
.btn.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed;
}
