/*
Theme Name: qipan
Description: PCB fabrication and assembly pages for qipan.
Version: 1.0.8
Requires at least: 6.7
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: qipcba
*/

:is(.company-page:not(.enterprise-upgrade), .editorial-page, .enterprise-contact-page)
main[data-qipcba-banner] > :is(section:first-child, nav.crumbs) .container {
    max-width: var(--k-container);
}

html[lang="en"] .enterprise-navigation .company-nav.trust-nav a:is(
    [href="/qipan/"], [href="/milestones/"], [href="/our-difference/"]
) {
    /* Preserve chip widths so that the shorter labels do not change the row breaks. */
    padding-inline-end: calc(10px + 4.09375em);
}

@media (max-width: 1100px) {
    html[lang="en"] .enterprise-navigation .company-nav.trust-nav a:is(
        [href="/qipan/"], [href="/milestones/"], [href="/our-difference/"]
    ) {
        padding-inline-end: calc(8px + 4.09375em);
    }
}

@media (max-width: 346px) {
    .site-footer .qipcba-footer-brand {
        display: block;
    }
}

.site-header .logo > .qipan-wordmark {
    display: block;
    width: auto;
    height: 42px;
    max-width: 158px;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 760px) {
    .site-header .logo > .qipan-wordmark {
        height: 31px;
        max-width: 116px;
    }
}

html[lang="zh-CN"] .home-products .prod-card .home-product-summary {
    margin: 0 24px 14px;
    color: #405970;
    font-size: 14px;
    line-height: 1.65;
}

.topbar.contact-topbar .contact-topbar__address {
    margin-right: 0;
    margin-inline-end: auto;
    min-inline-size: 0;
}

.topbar.contact-topbar [data-qipcba-contact-address],
.qipcba-contact-address {
    white-space: normal;
    overflow-wrap: anywhere;
}

.topbar.contact-topbar [data-qipcba-contact-address] {
    display: block;
}

[data-qipcba-contact-address] bdi {
    white-space: nowrap;
}

.qipcba-contact-address {
    margin-block: 1rem;
    font-style: normal;
}

.qipcba-contact-address strong {
    margin-inline-end: .4em;
}

.topbar.contact-topbar .contact-topbar__copy a {
    transition: color 150ms ease, scale 150ms ease;
}

.topbar.contact-topbar .contact-topbar__copy a:active {
    scale: .98;
}

@media (max-width: 600px) {
    .topbar.contact-topbar > .container {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .topbar.contact-topbar :is(.contact-topbar__address, .contact-topbar__email) {
        display: flex;
    }

    .topbar.contact-topbar .contact-topbar__address {
        flex-basis: 100%;
        max-inline-size: 100%;
        margin-inline-end: 0;
        font-size: 11px;
    }

    .topbar.contact-topbar .contact-topbar__address b {
        display: none;
    }

    .topbar.contact-topbar .contact-topbar__phone {
        margin-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topbar.contact-topbar .contact-topbar__copy a {
        transition: none;
    }
}

@media (max-width: 760px) {
    .site-header .qt-brand > .brand-logo {
        width: 146px;
        max-height: 56px;
    }
}

.qipcba-error-page {
    margin: 0;
    background: #fff;
    color: #172331;
    font: 1rem/1.65 system-ui, sans-serif;
}

.qipcba-not-found {
    box-sizing: border-box;
    max-width: 62rem;
    padding: clamp(2rem, 8vw, 6rem) 1.5rem;
    margin-inline: auto;
    view-transition-name: qipcba-recovery;
}

.qipcba-not-found *,
.qipcba-not-found *::before,
.qipcba-not-found *::after {
    box-sizing: border-box;
}

.qipcba-not-found > * {
    animation: qipcba-recovery-in 350ms ease both;
}

.qipcba-not-found > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-block-end: clamp(2rem, 6vw, 4rem);
}

.qipcba-not-found__status {
    margin: 0;
    color: #1257bb;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 750;
    line-height: 1.15;
}

.qipcba-not-found h1 {
    margin-block: .75rem 1rem;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.qipcba-not-found__description {
    max-width: 42rem;
    color: #42566b;
}

.qipcba-not-found__links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-block: 2rem;
}

.qipcba-not-found :is(a, button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .65rem 1.15rem;
    border: 1px solid #cad9ec;
    border-radius: .5rem;
    color: #1257bb;
    background: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.qipcba-not-found :is(a:hover, button:hover) {
    background: #edf4ff;
    border-color: #1257bb;
    transform: translateY(-2px);
}

.qipcba-not-found :is(a:active, button:active) {
    transform: scale(.98);
}

.qipcba-not-found :is(a, button, input):focus-visible {
    outline: 3px solid #1257bb;
    outline-offset: 4px;
}

.qipcba-not-found form {
    max-width: 42rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid #e1e8f0;
}

.qipcba-not-found label {
    display: block;
    margin-block-end: .65rem;
    font-weight: 600;
}

.qipcba-not-found__search {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.qipcba-not-found input {
    flex: 1 1 16rem;
    min-width: 0;
    width: 100%;
    min-height: 48px;
    padding: .65rem .9rem;
    border: 1px solid #8497af;
    border-radius: .5rem;
    color: #172331;
    background: #fff;
    font: inherit;
    transition: border-color 160ms ease, background 160ms ease;
}

.qipcba-not-found input::placeholder {
    color: #5a6b7e;
    opacity: 1;
}

.qipcba-not-found button {
    border-color: #1257bb;
    color: #fff;
    background: #1257bb;
}

.qipcba-not-found button:hover {
    background: #0c438f;
}

@keyframes qipcba-recovery-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes qipcba-recovery-out {
    to { opacity: 0; transform: translateY(-8px); }
}

::view-transition-old(qipcba-recovery) {
    animation: qipcba-recovery-out 150ms ease both;
}

::view-transition-new(qipcba-recovery) {
    animation: qipcba-recovery-in 250ms ease both;
}

@media (prefers-reduced-motion: reduce) {
    .qipcba-not-found *,
    .qipcba-not-found :is(a:hover, button:hover, a:active, button:active),
    ::view-transition-old(qipcba-recovery),
    ::view-transition-new(qipcba-recovery) {
        animation: none;
        transition: none;
        transform: none;
    }
}
