/* User Navigation Menu with Labels */
.nav-user-menu {
    gap: 0.5rem;
    margin-right: 25px; /* Increase right margin to prevent cutoff */
}

/* Special styling for profile button - new premium design */
.btn-glass-primary[title="My Profile"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    height: auto;
    min-height: 70px;
    padding: 12px 16px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(17, 24, 39, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.btn-glass-primary[title="My Profile"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-glass-primary[title="My Profile"] i {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    text-align: center;
    margin: 0;
}

.btn-glass-primary[title="My Profile"] span {
    display: block;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
}

.btn-glass-primary[title="My Profile"] .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 60px;
    height: 20px;
    line-height: 1;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
    border-radius: 50rem;
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: gradient-pulse 3s ease infinite;
}

@keyframes gradient-pulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fix overall header spacing */
@media (min-width: 992px) {
    .navbar > .container {
        max-width: 95%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-brand {
        margin-right: 2rem;
    }

    .nav-user-menu {
        padding-left: 0.5rem;
    }
}

.btn-glass-admin {
    background: linear-gradient(45deg, rgba(106, 17, 203, 0.7), rgba(37, 117, 252, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.btn-glass-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    background: linear-gradient(45deg, rgba(106, 17, 203, 0.8), rgba(37, 117, 252, 0.8));
}

.btn-glass-danger {
    background: linear-gradient(45deg, rgba(237, 33, 58, 0.7), rgba(147, 41, 30, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.btn-glass-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    background: linear-gradient(45deg, rgba(237, 33, 58, 0.8), rgba(147, 41, 30, 0.8));
}

/* Profile Badge Styling */
.badge.rounded-pill {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 50rem !important;
}

/* Full coverage for plan badges */
.badge.bg-gradient-secondary,
.badge.bg-gradient-info,
.badge.bg-gradient-purple {
    padding: 0.45em 0.85em;
    min-width: 4em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 50rem !important;
    width: 100%; /* Ensure full width coverage */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Ensure navbar profile badges have proper coverage */
.nav-user-menu .badge.bg-gradient-secondary,
.nav-user-menu .badge.bg-gradient-info,
.nav-user-menu .badge.bg-gradient-purple,
.navbar .badge.bg-gradient-secondary,
.navbar .badge.bg-gradient-info,
.navbar .badge.bg-gradient-purple {
    display: inline-flex;

/* Specific styling for profile level badges in navbar */
.navbar-nav .nav-link .badge {
    position: relative;
    z-index: 2; /* Ensure badge appears above other elements */
}

/* Different plan badge colors with stronger gradients for better visibility */
.badge.bg-gradient-secondary {
    background: linear-gradient(45deg, rgba(108, 117, 125, 0.95), rgba(73, 80, 87, 0.95)) !important;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.badge.bg-gradient-info {
    background: linear-gradient(45deg, rgba(13, 202, 240, 0.95), rgba(13, 110, 253, 0.95)) !important;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

.badge.bg-gradient-purple {
    background: linear-gradient(45deg, rgba(102, 16, 242, 0.95), rgba(153, 76, 252, 0.95)) !important;
    border: 1px solid rgba(102, 16, 242, 0.3);
}

/* Fix for username and badge alignment in navbar */
.navbar-nav .nav-item .d-flex.align-items-center {
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    padding: 0.3rem 0.3rem 0.3rem 1rem;
    margin-right: 10px; /* Add margin to prevent cutting off */
}

/* Ensure navbar has enough spacing */
.navbar-collapse {
    padding-right: 25px;
}

/* Center nav items in desktop view */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0.5rem 1rem;
    }

    .navbar-nav .nav-link i {
        margin-right: 0 !important;
        margin-bottom: 0.25rem;
        display: block;
    }
}

    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 5.5em; /* Wider to fully cover text */
    padding-left: 1.2em;
    padding-right: 1.2em;
    margin-left: 0.5em; /* Add spacing from username */
    white-space: nowrap; /* Prevent wrapping */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); /* Enhanced shadow for better visibility */
    font-weight: 700; /* Bolder text */
}

/* AR Badge Styling */
.ar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
    padding: 6px 14px !important;
}

.ar-badge .ar-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ar-badge .ar-text {
    white-space: nowrap;
}

/* Ensure icons don't overlap with text */
.ar-badge i.fas {
    margin: 0 !important; /* Remove existing margins */
}

/* Responsive styles */
@media (max-width: 991.98px) {
    .nav-user-menu {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-user-menu .btn {
        width: 100%;
        justify-content: center;
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }

    /* Enhanced mobile profile button with better spacing and alignment */
    .btn-glass-primary[title="My Profile"] {
        min-height: initial;
        padding: 0.5rem 1rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(90deg, rgba(30, 41, 59, 0.8), rgba(17, 24, 39, 0.95));
        border-radius: 50px;
        width: 100%;
        max-width: none; /* Remove max-width to match other buttons */
        margin: 0 0 0.5rem; /* Remove auto margins to align with container */
    }

    .btn-glass-primary[title="My Profile"] i {
        font-size: 1.1rem;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto;
        color: rgba(255, 255, 255, 0.9);
    }

    .btn-glass-primary[title="My Profile"] span {
        flex: 1;
        text-align: center;
        margin: 0;
        padding: 0 8px;
        font-weight: 600;
        white-space: nowrap;
    }

    .btn-glass-primary[title="My Profile"] .badge {
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto;
        padding: 3px 8px; /* Reduce horizontal padding to make badge less wide */
        min-width: auto;
        font-size: 0.7rem;
        font-weight: 700;
        max-width: fit-content; /* Ensure badge doesn't stretch unnecessarily */
    }
}

