@import url("branding.css");

/* =====================================================
   DASHBOARD CARDS & WRAPPERS
   ===================================================== */
.kk-account-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.shadow-brand { 
    box-shadow: var(--shadow-brand); 
}

.bg-brand { 
    background: var(--color-brand-gradient) !important; 
}

.text-brand { 
    color: var(--color-brand) !important; 
}

/* =====================================================
   SIDEBAR NAVIGATION
   ===================================================== */
.kk-profile-menu .nav-link {
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
    transition: var(--transition-normal);
    font-weight: 500;
    border: 1px solid transparent;
    width: 100%;
    background: none;
    font-family: var(--font-sans);
}

.kk-profile-menu .nav-link i { 
    font-size: var(--text-xl); 
    width: 32px; 
}

.kk-profile-menu .nav-link.active {
    background-color: var(--color-brand) !important;
    color: var(--color-white) !important;
}

.kk-profile-menu .nav-link:hover:not(.active) {
    background-color: var(--color-brand-light);
    color: var(--color-brand-dark);
}

.kk-profile-img-btn {
    width:32px !important;
    height:32px !important;
    min-height:32px !important;
    padding:0;
    cursor:pointer ;
}

/* =====================================================
   ORDERS TABLE
   ===================================================== */
.kk-order-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 var(--space-3); 
}

.kk-order-table thead th { 
    border: none; 
    color: var(--gray-400); 
    font-size: var(--text-xs); 
    text-transform: uppercase; 
    padding: 0 var(--space-5); 
    letter-spacing: 0.05em;
}

.kk-order-table tbody tr { 
    background: var(--color-white); 
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.kk-order-table tbody tr:hover { 
    transform: scale(1.01); 
    box-shadow: var(--shadow-md); 
}

.kk-order-table td { 
    padding: var(--space-5); 
    vertical-align: middle; 
    border: none; 
    font-size: var(--text-sm); 
}

.kk-order-table td:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.kk-order-table td:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

/* =====================================================
   STATUS BADGES
   ===================================================== */
.badge-status {
    display: inline-block;
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background: #fef3c7; color: var(--color-warning); }
.status-confirmed, .status-paid, .status-success { background: #dcfce7; color: var(--color-success); }
.status-shipped { background: #e0e7ff; color: #3730a3; }
.status-delivered { background: var(--color-brand-light); color: var(--color-brand-dark); border: 1px solid var(--color-brand); }
.status-cancelled, .status-failed { background: #fee2e2; color: var(--color-danger); }
.status-refunded { background: var(--gray-100); color: var(--gray-600); font-style: italic; }

/* =====================================================
   ADDRESS & FORMS
   ===================================================== */
.ring-brand { 
    border: 2px solid var(--color-brand) !important; 
    position: relative; 
}

.ring-brand::after {
    content: "\F26A"; 
    font-family: "bootstrap-icons";
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--color-brand);
    color: var(--color-white);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.form-control, .form-select {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    font-size: var(--text-sm);
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px var(--shadow-brand);
    outline: none;
}

/* =====================================================
   MODALS & UTILITIES
   ===================================================== */
.modal-content { 
    border-radius: var(--radius-xl); 
    border: none; 
    box-shadow: var(--shadow-lg);
}

.modal-header { 
    border-bottom: 1px solid var(--gray-100); 
    padding: var(--space-5);
}

.sticky-top { 
    z-index: var(--z-index-5); 
}

.tab-pane { 
    animation: fadeIn var(--transition-normal); 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 992px) {
    .kk-order-table thead { display: none; }
    .kk-order-table td { 
        display: block; 
        text-align: right; 
        border-bottom: 1px solid var(--gray-100); 
        padding: var(--space-3) var(--space-5); 
    }
    .kk-order-table td::before { 
        content: attr(data-label); 
        float: left; 
        font-weight: bold; 
        color: var(--gray-500); 
    }
    .kk-order-table td:last-child { border-bottom: none; }
}

/* =====================================================
   PREVENT MODAL BODY SHIFT (STABLE LAYOUT)
   ===================================================== */

/* 1. Reserve the scrollbar space so content doesn't reflow */
html {
    scrollbar-gutter: stable;
}

/* 2. Force Bootstrap to stop adding the calculated padding-right */
body.modal-open {
    padding-right: 0 !important;
    overflow-y: hidden; /* Standard modal behavior */
}

/* 3. Ensure fixed or sticky elements (like your sidebar) stay put */
body.modal-open .sticky-top,
body.modal-open .fixed-top,
body.modal-open .navbar {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* 4. Fallback for older browsers: always show the scrollbar track */
@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}