/* assets/css/admin-portal.css */

/* ======================================================================================
   ADMIN PORTAL STYLES -- app\components\admin-portal-dashboard.php
   ====================================================================================== */

/* --------------------------------------------------------------------------------------
   ADMIN PORTAL CONTAINER
   -------------------------------------------------------------------------------------- */

.container:has(.kgs-admin-panel) {
    max-width: 1500px !important;
}

.page-title-container:has(+ .kgs-admin-panel) {
    display: none;
}

.kgs-admin-panel {
    min-height: 80vh;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 3rem;
}


/* --------------------------------------------------------------------------------------
   ADMIN SIDEBAR
   -------------------------------------------------------------------------------------- */

.kgs-admin-panel .kgs-admin-sidebar {
    background-color: var(--secondary);
    border-right: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.kgs-admin-panel-title {
	color: var(--accent);
	font-size: 1rem;
}

.kgs-active-user-name {
	color: #FFFFFF;	
	font-size: 1rem;
}

.kgs-active-user-email {
	color: #FFFFFF;	
	font-size: 0.7rem;
}

/* --------------------------------------------------------------------------------------
   SIDEBAR NAVIGATION
   -------------------------------------------------------------------------------------- */

.kgs-admin-panel .kgs-admin-sidebar .nav-pills .nav-link {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    margin-bottom: 0px;
    text-align: left;
    background: none;
    border: none;
    width: 100%;
    transition: all 0.2s;
}

.kgs-admin-panel .kgs-admin-sidebar .nav-pills .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.05);
}

.kgs-admin-panel .kgs-admin-sidebar .nav-pills .nav-link.active {
    color: var(--secondary) !important;
    background-color: var(--accent) !important;
}

.kgs-admin-panel .kgs-admin-sidebar .nav-link i {
    width: 1.25rem;
    text-align: center;
    margin-right: 0.5rem;
}


/* --------------------------------------------------------------------------------------
   ADMIN BODY
   -------------------------------------------------------------------------------------- */

.kgs-admin-panel .kgs-admin-body {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}


/* --------------------------------------------------------------------------------------
   FORM SWITCHES
   -------------------------------------------------------------------------------------- */

.kgs-admin-panel .form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
	margin-right: 0.25rem;
}


/* --------------------------------------------------------------------------------------
   HELP ICONS
   -------------------------------------------------------------------------------------- */

.kgs-admin-panel .help-icon {
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s;
}

.kgs-admin-panel .help-icon:hover {
    color: var(--primary) !important;
}


/* --------------------------------------------------------------------------------------
   THEME RESET BUTTON
   -------------------------------------------------------------------------------------- */

.kgs-admin-panel .theme-reset-btn {
    font-size: 0.6rem;
    text-transform: uppercase;
}


/* --------------------------------------------------------------------------------------
   RESPONSIVE BEHAVIOR
   -------------------------------------------------------------------------------------- */

@media (max-width: 1300px) {
    .kgs-admin-panel .kgs-admin-sidebar .nav-link i {
        display: none;
    }
}

@media (max-width: 992px) {
    .kgs-admin-panel .kgs-admin-sidebar {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        min-height: auto;
        border-top-left-radius: 0.75rem;
        border-top-right-radius: 0.75rem;
        border-bottom-left-radius: 0;
    }
}

/* ======================================================================================
   ADMIN PORTAL INTEGRATED LAYOUT OVERRIDES (900px VIEWPORT BREAKPOINT)
   ====================================================================================== */

/* Scopes exact 900px responsive stack rules [Section 5] */
@media (max-width: 900px) {
    .kgs-admin-panel .row {
        flex-direction: column !important;
    }
    .kgs-admin-panel .col-12, 
    .kgs-admin-panel .col-md-3, 
    .kgs-admin-panel .col-md-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    .kgs-admin-sidebar {
        margin-bottom: 1.5rem !important;
    }
}

/* Fluid wrap rules for long email strings to prevent sidebar breakage [Section 5] */
.kgs-active-user-box {
    word-break: break-word !important;
    white-space: normal !important;
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
}

/* Collapsible sub-menu nav padding adjustments */
.sidebar-submenu-nav .nav-link {
    font-size: 12px !important;
    padding: 6px 12px !important;
    color: #FFFFFF !important;
    border-radius: 6px !important;
}
.sidebar-submenu-nav .nav-link.active {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 700;
}
.sidebar-submenu-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.06) !important;
}