/*
 * File: slideout-menu.css
 * Description: Styles for the slide-out menu and stabilized header layout.
 */

/* 1. Auth Links Container (STABILIZED STACKED LAYOUT) */
.dtmm-top-bar-account {
    display: flex;
    flex-direction: column; 
    align-items: flex-end;  
    gap: 8px; /* Reduced gap for better vertical density */
    padding-right: 15px; /* Standardized gutter */
    max-width: 100%;
    overflow: hidden; /* Prevents container breaking */
}

/* 2. The Panel (Hidden by default, slides from LEFT) */
.dtmm-slideout-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 80%;
    height: 100vh;
    background-color: #343a40;
    z-index: 100000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.dtmm-slideout-panel.is-open {
    transform: translateX(0);
}

/* 3. The Overlay */
.dtmm-slideout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.dtmm-slideout-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* 4. Body Lock */
body.dtmm-panel-is-open {
    overflow: hidden;
}

/* 5. Panel Content */
.dtmm-slideout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 60px;
    border-bottom: 1px solid #495057;
    flex-shrink: 0;
}

.dtmm-slideout-header h3 {
    color: #f8f9fa;
    font-size: 1.2rem;
    margin: 0;
}

.dtmm-slideout-close {
    background: none;
    border: none;
    color: #f8f9fa;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
}

.dtmm-slideout-nav {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column; 
}

.dtmm-slideout-nav ul {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

.dtmm-slideout-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.5rem;
    color: #f8f9fa;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.dtmm-slideout-nav li a:hover {
    background-color: #495057;
}

.dtmm-slideout-nav .dtsm-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.dtmm-slideout-nav .dtsm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.dtmm-slideout-nav .dtsm-title {
    flex-grow: 1;
}

.dtmm-slideout-nav ul.dtmm-slideout-logout {
   display: block; 
   margin-top: auto; 
   padding-top: 1rem;
   border-top: 1px solid #495057;
}

/*
 * ===================================================================
 * Header Auth & Social Icon Styling (STACKED & STABILIZED)
 * ===================================================================
 */

/* 1. Social Icons */
.dt-social-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    gap: 12px;
    width: 100%; 
}

.dt-social-icons .social-icon .dtsm-icon svg {
    width: 24px;
    height: 24px;
    fill: #555;
    transition: all 0.2s ease-in-out;
}

.dt-social-icons .social-icon:hover .dtsm-icon svg { 
    transform: scale(1.1);
}

/* 2. Auth Links (Mail, Account, Logout, Cart) - HORIZONTAL LAYOUT */
.dt-auth-links {
    display: flex;
    align-items: center; 
    justify-content: flex-end; 
    gap: 12px; /* Standardized spacing to prevent overflow */
    width: auto;
    white-space: nowrap; /* CRITICAL: Prevents text wrapping that breaks borders */
}

.dt-auth-link {
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 6px; 
    text-decoration: none;
    font-size: 0.9rem; 
    font-weight: 500;
    color: #555;
    transition: color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.dt-auth-link:hover {
    color: #a987c2; 
}

/* Icon Standardization */
.dt-auth-link .dtsm-icon,
.dt-notification-trigger .mail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px; 
    width: 22px;  
}

.dt-auth-link .dtsm-icon svg,
.dt-notification-trigger .mail-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Cart Anchor */
.dt-cart-link {
    margin-left: 4px;
}

/* Bolder outline icons */
.dt-cart-link svg, .dt-login-link svg {
    stroke-width: 2; 
}

/*
 * ===================================================================
 * Notification Elements
 * ===================================================================
 */

.dt-nav-unread-badge {
    background-color: #a987c2; 
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    font-family: sans-serif;
}

/* Slideout Badge (Inline Header Text) */
.dt-nav-unread-badge.slideout-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 12px;
    background-color: #a987c2;
    color: #fff;
    border-radius: 99px;
    text-decoration: none;
}

/* Mail Trigger (Top Bar) */
.dt-notification-trigger {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-right: 2px; /* Buffer before Account */
    color: #555;
    transition: color 0.2s ease;
}

.dt-notification-trigger:hover {
    color: #a987c2;
}

.dt-notification-trigger .notif-count {
    background-color: #a987c2;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 10px;
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
}