/*
 * 绘城官网导航栏品牌入口
 *
 * 左侧：
 * 原有绘城数字科技 Logo
 *
 * 右侧：
 * 管理员登录
 * 绘城智算 Logo
 * 智绘嘉AI Logo
 */

/*
 * 清理旧版本创建的左侧悬浮Logo。
 */
.hc-official-brand-link {
    display: none !important;
}

/*
 * 右侧品牌入口必须跟随导航栏布局，
 * 禁止 fixed、absolute 和浮动定位。
 */
.hc-global-brand-switcher {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: auto;
    height: 42px;
    margin: 0 0 0 10px;
    padding: 0;

    flex: 0 0 auto;
    overflow: visible;
    vertical-align: middle;
}

.hc-global-brand-switcher[hidden] {
    display: none !important;
}

/*
 * 单个Logo按钮。
 */
.hc-nav-brand-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 42px;
    padding: 4px;

    flex: 0 0 auto;
    box-sizing: border-box;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);

    text-decoration: none;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

/*
 * 横版Logo自动扩展宽度。
 */
.hc-nav-brand-link.is-wide {
    width: 104px;
}

.hc-nav-brand-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.10);
}

.hc-nav-brand-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.hc-nav-brand-link img {
    display: block;

    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    object-position: center;
    border: 0;
}

/*
 * 图片不存在时不显示破图标识。
 */
.hc-nav-brand-link.is-image-missing {
    display: none !important;
}

/*
 * 恢复旧脚本曾经隐藏的左侧原始Logo。
 */
[data-hc-original-brand-hidden="true"] {
    visibility: visible !important;
    opacity: 1 !important;
}

/*
 * 平板端。
 */
@media (max-width: 1100px) {
    .hc-global-brand-switcher {
        gap: 7px;
        margin-left: 7px;
    }

    .hc-nav-brand-link {
        width: 42px;
        height: 38px;
        border-radius: 8px;
    }

    .hc-nav-brand-link.is-wide {
        width: 86px;
    }
}

/*
 * 手机端。
 */
@media (max-width: 760px) {
    .hc-global-brand-switcher {
        gap: 5px;
        height: 34px;
        margin-left: 4px;
    }

    .hc-nav-brand-link {
        width: 34px;
        height: 34px;
        padding: 3px;
        border-radius: 7px;
    }

    .hc-nav-brand-link.is-wide {
        width: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hc-nav-brand-link {
        transition: none;
    }
}

/* HC_NAVBAR_POSITION_FIX_START */

/*
 * 品牌Logo必须作为导航栏普通子元素排列。
 * 禁止固定定位、绝对定位和首屏正文定位。
 */
.hc-global-brand-switcher {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;

    flex: 0 0 auto;
    width: auto !important;
    height: 42px;
    margin: 0 0 0 10px !important;
    padding: 0 !important;

    transform: none !important;
    translate: none !important;
    float: none !important;

    vertical-align: middle;
    z-index: auto !important;
}

.hc-global-brand-switcher[hidden] {
    display: none !important;
}

.hc-global-brand-switcher .hc-nav-brand-link {
    position: relative !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px !important;
    height: 42px !important;
    margin: 0 0 0 8px !important;
    padding: 3px !important;

    flex: 0 0 42px;

    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    border-radius: 9px !important;
    background: rgba(0, 0, 0, 0.12) !important;
    box-sizing: border-box;

    overflow: hidden;
}

.hc-global-brand-switcher .hc-nav-brand-link img {
    display: block;

    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
    object-position: center !important;
}

/* HC_NAVBAR_POSITION_FIX_END */
