/* Header styles */

/* Notification icon and count styles */
.header-icon[data-notification] {
    position: relative;
    width: auto;
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border: 1px solid var(--cl-primary-border-color);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
}

.header-icon[data-notification] a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 27px;
    width: 100%;
    height: 100%;
    color: white;
    text-decoration: none;
}

.header-icon[data-notification] svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.notification-count {
    color: white;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.underlap-header {
    background-color: var(--cl-primary-bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--cl-primary-border-color);
    height: 64px;
    /* position: sticky; */
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-logo {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--cl-text-primary);
    gap: 10px;
    opacity: 1;
}

.header-logo img {
    width: 125px;
    height: 65.5px;
    margin-left: 18px;
}

.header-search {
    position: absolute;
    width: 600px;
    height: 44px;
    top: 10px;
    left: 46%;
    transform: translateX(-50%);
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-searchbar__input {
    position: relative;
    width: 600px;
    height: 40px;
    display: flex;
    align-items: center;
}

.header-search input {
    width: 600px;
    height: 40px;
    padding: 10px 12px 10px 40px;
    border-radius: 40px;
    border: 1px solid var(--cl-border-color);
    background-color: transparent;
    color: var(--cl-primary-text-color);
    font-size: 14px;
    line-height: 20px;
    box-sizing: border-box;
    outline: none;
    margin: 0;
}



.header-search input::placeholder {
    color: var(--cl-text-secondary);
    opacity: 0.8;
}

/* Search results dropdown */
.search-result__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cl-primary-bg-color);
    border: 1px solid var(--cl-border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1100;
}

.search-result__list-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--cl-border-color);
    transition: background-color 0.2s ease;
}

.search-result__list-item:last-child {
    border-bottom: none;
}

.search-result__list-item:hover {
    background-color: var(--cl-event-hover-bg);
}

.search-result__list-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.result-item-data {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-item-data__avatar {
    flex-shrink: 0;
}

.result-item-data__avatar .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.result-item-data__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-item-data__topline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-name-holder {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-name-holder__name {
    font-weight: 600;
    color: var(--cl-primary-text-color);
}

.user-name-holder__badge {
    display: inline-flex;
    color: var(--cl-primary-color);
}

.user-name-holder__badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.header-search .keyword-input__left-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.header-search .keyword-input__left-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.header-search .keyword-input__right-icon,
.header-search .keyword-input__right-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: var(--cl-text-secondary);
    z-index: 1;
    cursor: pointer;
}

.sidebar-searchbar__input {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions .btn {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.header-actions .btn-primary {
    background-color: var(--cl-primary-color);
    color: white;
    border: none;
}

.header-actions .btn-outline-primary {
    background-color: transparent;
    color: var(--cl-primary-color);
    border: 1px solid var(--cl-primary-color);
}

.header-actions .btn:hover {
    opacity: 0.9;
}

.header-icon {
    color: var(--cl-text-primary);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.header-icon svg {
    width: 20px;
    height: 20px;
}

.notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 8px;
    height: 8px;
    background-color: var(--cl-primary-color);
    border-radius: 50%;
    border: 2px solid var(--cl-bg-primary);
}

.theme-toggle {
    cursor: pointer;
    color: var(--cl-text-primary);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.theme-toggle:hover {
    background-color: var(--cl-bg-tertiary);
}

@media (max-width: 768px) {
    .header-search {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .header-search {
        display: none;
    }
}

[data-skin="dark"] .underlap-header {
    background-color: #15202b;
    border-bottom: 1px solid #222;
}

[data-skin="dark"] .header-search input {
    background-color: #1a1a1a;
    color: #fff;
}

[data-skin="dark"] .header-search svg {
    color: #666;
}

[data-skin="dark"] .header-actions .btn-primary {
    background-color: #1d9bf0;
    color: white;
}

[data-skin="dark"] .header-actions .btn-outline-primary {
    color: #1d9bf0;
    border-color: #1d9bf0;
}

[data-skin="dark"] .header-icon,
[data-skin="dark"] .theme-toggle {
    color: #fff;
}

[data-skin="light"] .underlap-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

[data-skin="light"] .header-search input {
    background-color: #f0f2f5;
    color: #050505;
}

[data-skin="light"] .header-search svg {
    color: #65676b;
}

[data-skin="light"] .header-actions .btn-primary {
    background-color: #1d9bf0;
    color: white;
}

[data-skin="light"] .header-actions .btn-outline-primary {
    color: #1d9bf0;
    border-color: #1d9bf0;
}

[data-skin="light"] .header-icon,
[data-skin="light"] .theme-toggle {
    color: #050505;
}

[data-skin="light"] .header-icon path,
[data-skin="light"] .header-icon svg path,
[data-skin="light"] .theme-toggle svg path {
    stroke: #050505;
}

[data-skin="light"] .header-icon path[fill="white"],
[data-skin="light"] .header-icon svg path[fill="white"] {
    fill: #050505;
}