/**
 * CloudPedia Header Adjustments for Sidebar Layout
 * Styles to make the header work with the collapsible sidebar
 */

/* ========================================
   Body Layout with Sidebar
   ======================================== */
.cp-sidebar-layout {
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Header Adjustments
   ======================================== */
.cp-main-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cp-main-header .topbar {
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cp-top-toolbar {
    padding: 1.25rem 0;
    background: #fff;
}

.cp-top-toolbar .search {
    max-width: 400px;
}

.cp-top-toolbar .search .form-control {
    border-color: rgba(0, 0, 0, 0.1);
}

.cp-top-toolbar .search .form-control:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.cp-top-toolbar .cart-btn {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cp-top-toolbar .cart-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
}

.cp-top-toolbar .cart-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #FFD700;
    color: #0A0854;
    font-size: 0.625rem;
    padding: 0.25rem 0.4rem;
    border-radius: 10px;
}

/* ========================================
   Breadcrumb Adjustments
   ======================================== */
.master-breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ========================================
   Main Body Adjustments
   ======================================== */
#main-body {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ========================================
   Mobile Adjustments
   ======================================== */
@media (max-width: 991px) {
    .cp-main-header {
        margin-left: 0;
    }
    
    .cp-top-toolbar .search {
        display: none !important;
    }
}

/* ========================================
   Hide Original Navbar
   ======================================== */
.main-navbar-wrapper {
    display: none !important;
}

/* ========================================
   Smooth Transitions
   ======================================== */
.cp-main-header,
#main-body,
.master-breadcrumb {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   News Notification Bar
   ======================================== */
/* Align header container with standard breadcrumb container */
body:has(.cp-home-wrapper) .cp-top-toolbar .container {
    padding-left: var(--cp-spacing-md);
    padding-right: var(--cp-spacing-md);
}

.cp-news-bar {
    display: flex;
    align-items: center;
    gap: var(--cp-spacing-md);
}

.cp-news-badge {
    background: #D6D5FF;
    color: var(--cp-navy-dark);
    padding: 0.35rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cp-news-message {
    color: var(--cp-navy-dark);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cp-news-message:hover {
    color: #4A4AFB;
    text-decoration: none;
}

@media (max-width: 576px) {
    .cp-news-bar {
        gap: var(--cp-spacing-sm);
    }
    .cp-news-message {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
}
