/* assets/css/themes/orange/top-header.css */
/* Redesigned Top Header - Using Theme Variables */

/* ================================= */
/* TOP BAR CONTAINER */
/* ================================= */
.top-bar {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 8px 0;
    font-size: var(--text-sm);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================================= */
/* HEADER INNER LAYOUT */
/* ================================= */
.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ================================= */
/* ACCOUNT SECTION */
/* ================================= */
.cnt-account ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 5px;
}

.cnt-account li {
    position: relative;
}

/* Link Styles */
.cnt-account a,
.right-menu a {
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--spacing-sm) 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    font-family: var(--font-family);
    font-size: var(--text-sm);
}

.cnt-account a::before,
.right-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cnt-account a:hover::before,
.right-menu a:hover::before {
    left: 100%;
}

.cnt-account a:hover,
.right-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Icon Styles */
.icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: transform var(--transition);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.cnt-account a:hover .icon,
.right-menu a:hover .icon {
    transform: scale(1.1);
}

/* Welcome User */
.welcome-user {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
}

.welcome-user .welcome-text {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================= */
/* RIGHT MENU */
/* ================================= */
.right-menu {
    margin-left: auto;
}

.right-menu ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 5px;
}

.right-menu-items {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.right-menu-items:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ================================= */
/* MOBILE RESPONSIVE - ENHANCED */
/* ================================= */

/* Tablet */
@media (max-width: 992px) {
    .header-top-inner {
        justify-content: center;
        gap: var(--spacing-sm);
    }
    
    .cnt-account,
    .right-menu {
        width: 100%;
        justify-content: center;
    }
    
    .cnt-account ul,
    .right-menu ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .right-menu {
        margin-left: 0;
    }
    
    .cnt-account a,
    .right-menu a {
        padding: var(--spacing-sm) var(--spacing);
        font-size: 13.5px;
    }
    
    .icon {
        font-size: 15px;
    }
}

/* Mobile - Enhanced Layout */
@media (max-width: 768px) {
    .top-bar {
        padding: 6px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        backdrop-filter: blur(10px);
        background: linear-gradient(135deg, 
            rgba(var(--primary-rgb), 0.95) 0%, 
            rgba(217, 119, 6, 0.95) 100%);
    }
    
    .container {
        padding: 0 var(--spacing);
    }
    
    .header-top-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0;
        padding: 0;
    }
    
    .cnt-account,
    .right-menu {
        width: auto;
        flex: 1;
    }
    
    .cnt-account ul {
        justify-content: flex-start;
        gap: var(--spacing-xs);
    }
    
    .right-menu ul {
        justify-content: flex-end;
        gap: var(--spacing-xs);
    }
    
    /* Compact link style for mobile */
    .cnt-account a,
    .right-menu a {
        padding: var(--spacing-sm) 12px;
        font-size: 0; /* Hide text initially */
        gap: 0;
        border-radius: var(--radius-full);
        width: 40px;
        height: 40px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Show text on hover/focus for accessibility */
    .cnt-account a:focus,
    .right-menu a:focus {
        font-size: var(--text-xs);
        width: auto;
        border-radius: 20px;
        padding: var(--spacing-sm) 14px;
        gap: 6px;
    }
    
    .icon {
        font-size: 18px;
        margin: 0;
        width: auto;
    }
    
    /* Welcome user special treatment */
    .welcome-user a {
        font-size: var(--text-xs);
        width: auto;
        border-radius: 20px;
        padding: var(--spacing-sm) 14px;
        gap: 6px;
    }
    
    .welcome-user .welcome-text {
        font-size: var(--text-xs);
        max-width: 120px;
    }
    
    /* Tooltip effect for icon-only buttons */
    .cnt-account a::after,
    .right-menu a::after {
        content: attr(title);
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 6px 10px;
        border-radius: var(--radius-sm);
        font-size: 11px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 1000;
        pointer-events: none;
        box-shadow: var(--shadow);
    }
    
    .cnt-account a:hover::after,
    .right-menu a:hover::after {
        opacity: 1;
        visibility: visible;
        bottom: -30px;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .cnt-account a,
    .right-menu a {
        width: 38px;
        height: 38px;
        padding: 6px;
    }
    
    .icon {
        font-size: 16px;
    }
    
    /* Welcome user adjustments */
    .welcome-user a {
        padding: 6px 12px;
    }
    
    .welcome-user .welcome-text {
        max-width: 100px;
        font-size: 11px;
    }
    
    /* Icon tooltip adjustments */
    .cnt-account a::after,
    .right-menu a::after {
        font-size: 10px;
        padding: 5px 8px;
        bottom: -32px;
    }
    
    .cnt-account a:hover::after,
    .right-menu a:hover::after {
        bottom: -27px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .top-bar {
        padding: 5px 0;
    }
    
    .cnt-account a,
    .right-menu a {
        width: 36px;
        height: 36px;
        padding: 5px;
    }
    
    .icon {
        font-size: 15px;
    }
    
    .welcome-user a {
        padding: 5px 10px;
    }
    
    .welcome-user .welcome-text {
        max-width: 80px;
        font-size: 10px;
    }
}

/* Ultra Small Mobile */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .cnt-account ul,
    .right-menu ul {
        gap: 3px;
    }
    
    .cnt-account a,
    .right-menu a {
        width: 34px;
        height: 34px;
        padding: 4px;
    }
    
    .icon {
        font-size: 14px;
    }
    
    .welcome-user .welcome-text {
        max-width: 60px;
    }
}

/* ================================= */
/* TOUCH DEVICE OPTIMIZATIONS */
/* ================================= */
@media (hover: none) and (pointer: coarse) {
    .cnt-account a,
    .right-menu a {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Active state for touch */
    .cnt-account a:active,
    .right-menu a:active {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    /* Show tooltips on active */
    .cnt-account a:active::after,
    .right-menu a:active::after {
        opacity: 1;
        visibility: visible;
        bottom: -30px;
    }
}

/* ================================= */
/* ANIMATIONS */
/* ================================= */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-bar {
    animation: slideIn 0.5s ease-out;
}

/* Smooth transition for all interactive elements */
.cnt-account a,
.right-menu a,
.icon {
    transition: var(--transition);
}