/*
 * File: slideout-menu.css
 * Description: Styles for the new slide-out menu.
 */

/* 1. Auth Links Container (STACKED LAYOUT + PADDING) */
.dtmm-top-bar-account {
    display: flex;
    flex-direction: column; /* This stacks the items vertically */
    align-items: flex-end;  /* Aligns both rows to the right */
    gap: 10px; /* Space between the social row and the auth row */
    padding-right: 10px; /* --- YOUR PADDING --- */
}

/* 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; /* Pushes to the bottom */
   padding-top: 1rem;
   border-top: 1px solid #495057;
}

/*
 * ===================================================================
 * Header Auth & Social Icon Styling (STACKED)
 * ===================================================================
 */

/* 1. Social Icons */
.dt-social-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align this row to the right */
    gap: 12px;
    width: 100%; /* Ensure it spans the container for alignment */
}

.dt-social-icons .social-icon .dtsm-icon {
    display: block;
    line-height: 1;
}
.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 (Cart & Login) - HORIZONTAL LAYOUT */
.dt-auth-links {
    display: flex;
    align-items: center; 
    justify-content: flex-end; /* Align this row to the right */
    gap: 15px;
    width: 100%; /* Ensure it spans the container for alignment */
}

.dt-auth-link {
    display: flex;
    flex-direction: row; /* HORIZONTAL */
    align-items: center;
    gap: 6px; /* Space between icon and text */
    text-decoration: none;
    font-size: 0.9rem; /* Slightly larger text */
    font-weight: 500;
    color: #555;
    transition: color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.dt-auth-link:hover {
    color: #a987c2; /* Theme purple color on hover */
}

/* --- NEW: Standardize icon sizes --- */
.dt-auth-link .dtsm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 24px; /* Standardized height */
    width: 24px;  /* Standardized width */
}

.dt-auth-link .dtsm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.dt-auth-link .auth-link-text {
    margin-top: 0; /* Remove top margin */
}

/* Override stroke-width for outline icons */
.dt-cart-link svg, .dt-login-link svg {
    stroke-width: 2; /* Make outline icons bolder */
}

/* Specific style for Logout icon */
.dt-logout-link .dtsm-icon svg {
    width: 20px; /* Make logout icon slightly smaller */
    height: 20px;
}
/* --- Notification Badges --- */

/* Common Badge Style */
.dt-nav-unread-badge {
    background-color: #a987c2; /* Bright Red */
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    font-family: sans-serif;
}

/* Header Badge (Floating Dot) */
.dt-nav-unread-badge.header-badge {
    position: static;       /* Sits in the natural flow */
    margin-right: 0;        /* The parent flex-gap handles the spacing */
    
    /* Pill Styling */
    background-color: #a987c2; /* Red background */
    color: #ffffff;            /* White text */
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;          /* Slightly larger padding for pill shape */
    border-radius: 12px;       /* Rounded pill shape */
    min-width: 18px;           /* Ensures it doesn't look squashed if "1" */
    text-align: center;
    border: none;              /* Remove border as it's no longer overlapping */
}

/* Slideout Badge (Inline Text) */
.dt-nav-unread-badge.slideout-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    padding: 4px 8px;
    font-size: 12px;
    background-color: #a987c2;
    border: none;
    position: relative;
    top: -1px;
}

/* Ensure the badge link looks like a button/badge, not a text link */
a.dt-nav-unread-badge {
    text-decoration: none; /* Remove underline */
    cursor: pointer;
    display: inline-block; /* Ensures padding works */
}

a.dt-nav-unread-badge:hover {
    background-color: #b65df5; /* Darker red on hover */
    color: #fff;
}

/* --- Notification Mail Trigger --- */
.dt-notification-trigger {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 5px; /* Space between mail icon and person icon */
    color: #555; /* Default icon color */
    position: relative;
    transition: color 0.2s ease;
}

.dt-notification-trigger:hover {
    color: #a987c2; /* Theme purple */
}

/* The Mail SVG Icon */
.dt-notification-trigger .mail-icon {
    width: 22px;
    height: 22px;
    display: block;
    line-height: 1;
}

/* The Red Count Badge */
.dt-notification-trigger .notif-count {
    background-color: #a987c2; /* Bright Red */
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 10px;
    margin-left: 3px; /* Tiny space between envelope and number */
    min-width: 16px;
    text-align: center;
    
    /* Optional: Make it overlap slightly for a 'badge' feel */
    /* position: relative; */
    /* top: -8px; */
    /* left: -5px; */
}