/**
 * 商标分类 / 申请页样式（静态 CSS，Blade 直接引用）
 * 与 Bagisto Shop 主站一致：navyBlue 主色、线性边框、无卡片阴影
 * 修改本文件后刷新即可，无需单独编译 TmClass 的 vite 资源
 */

#tm-class-query-app,
#tm-class-application-app {
    width: 100%;
    margin: 0;
    padding: 0;
    --tm-accent: #111111;
    --tm-active-bg: #f0f0f0;
    --tm-hover-bg: #f5f5f5;
    --tm-muted-bg: #f7f8fa;
    --tm-border: #d8dce3;
    --tm-text: #444444;
    --tm-text-muted: #666666;
}

main#main:has(#tm-class-query-app),
main#main:has(#tm-class-application-app),
main#main:has(#tm-class-hub-app) {
    padding: 0;
}

#tm-class-hub-app {
    width: 100%;
    margin: 0;
    padding: 0;
}

#tm-class-query-app .tm-page-breadcrumbs,
#tm-class-application-app .tm-page-breadcrumbs,
#tm-class-hub-app .tm-page-breadcrumbs {
    margin: 0 0 20px;
    padding-top: clamp(20px, 3vw, 32px);
    font-size: 13px;
    line-height: 1.5;
}

#tm-class-query-app .tm-page-breadcrumbs a,
#tm-class-application-app .tm-page-breadcrumbs a,
#tm-class-hub-app .tm-page-breadcrumbs a {
    color: #666666;
    transition: color 0.18s ease;
}

#tm-class-query-app .tm-page-breadcrumbs a:hover,
#tm-class-application-app .tm-page-breadcrumbs a:hover,
#tm-class-hub-app .tm-page-breadcrumbs a:hover {
    color: #111111;
}

.tm-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .tm-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

.tm-hub-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.tm-hub-card:hover {
    border-color: #111111;
    background: #fafafa;
}

.tm-hub-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #111111;
}

.tm-hub-card__desc {
    font-size: 13px;
    line-height: 1.5;
    color: #666666;
}

#tm-class-query-app .tm-query-page,
#tm-class-application-app .tm-query-page,
#tm-class-hub-app.tm-query-page {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #f3f4f6;
}

#tm-class-query-app .tm-query-page__container,
#tm-class-application-app .tm-query-page__container,
#tm-class-hub-app .tm-query-page__container {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0 50px;
    box-sizing: border-box;
}

#tm-class-query-app .tm-query-page__stack,
#tm-class-application-app .tm-query-page__stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 768px) {
    #tm-class-query-app .tm-query-page__stack,
    #tm-class-application-app .tm-query-page__stack {
        gap: 32px;
    }
}

.tm-block {
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.tm-block__pad {
    padding: 16px 20px;
}

@media (min-width: 768px) {
    .tm-block__pad {
        padding: 20px 24px;
    }
}

.tm-block__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #060c3b;
}

.tm-grid-9 {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 8px;
}

.tm-split {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.tm-split--flush {
    margin-top: 0;
}

@media (min-width: 1024px) {
    .tm-split {
        margin-top: 24px;
    }

    .tm-split--flush {
        margin-top: 0;
    }
}

.tm-split__col--3 {
    grid-column: 1 / -1;
    min-width: 0;
}

.tm-split__col--6 {
    grid-column: 1 / -1;
    min-width: 0;
}

@media (min-width: 1024px) {
    .tm-split__col--3 {
        grid-column: span 3;
    }

    .tm-split__col--6 {
        grid-column: span 6;
    }
}

.tm-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 4px;
    border: 1px solid var(--tm-border);
    border-radius: 6px;
    background: #fff;
    color: var(--tm-text);
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tm-pill .tm-pill__num {
    color: var(--tm-text);
}

.tm-pill .tm-pill__name {
    color: var(--tm-text-muted);
}

.tm-pill__line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-pill__num {
    flex-shrink: 0;
    font-weight: 600;
}

.tm-pill__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-pill__count {
    flex-shrink: 0;
    margin-left: 2px;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
}

@media (min-width: 640px) {
    .tm-pill {
        min-height: 40px;
        font-size: 12px;
    }
}

.tm-pill:hover {
    border-color: var(--tm-accent);
    color: var(--tm-accent);
}

.tm-pill--active {
    border: 2px solid var(--tm-accent);
    background: var(--tm-active-bg);
    font-weight: 600;
    color: var(--tm-accent);
}

.tm-pill--active .tm-pill__num,
.tm-pill--active .tm-pill__name {
    color: var(--tm-accent);
}

.tm-pill--marked {
    border: 1px solid var(--tm-accent);
    background: var(--tm-hover-bg);
    font-weight: 500;
    color: var(--tm-text);
}

.tm-pill--marked .tm-pill__num,
.tm-pill--marked .tm-pill__name {
    color: var(--tm-text);
}

.tm-pill.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.tm-panel {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.tm-panel--muted {
    background: #f7f8fa;
}

.tm-panel__head {
    flex-shrink: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #e9e9e9;
    font-size: 14px;
    font-weight: 600;
    color: #060c3b;
    background: #fff;
}

.tm-panel__body {
    flex: 1;
    padding: 16px;
    min-height: 0;
}

.tm-panel__scroll {
    flex: 1;
    overflow-y: auto;
    max-height: 480px;
}

.tm-panel__scroll--tall {
    max-height: 900px;
}

.tm-class-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #e9e9e9;
    border-bottom: 0;
    background: #f7f8fa;
    font-size: 14px;
    color: #060c3b;
}

.tm-group-box {
    border: 1px solid #e9e9e9;
    border-top: 0;
}

.tm-group-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e9e9e9;
    text-align: left;
    font-size: 14px;
    color: #666;
    background: #fff;
    cursor: pointer;
    transition: background 0.18s ease;
}

.tm-group-row:last-child {
    border-bottom: 0;
}

.tm-group-row:hover {
    background: var(--tm-hover-bg);
}

.tm-group-row--active {
    background: var(--tm-active-bg);
    font-weight: 600;
    color: var(--tm-accent);
}

.tm-group-row--bold {
    font-weight: 600;
    color: var(--tm-accent);
}

.tm-item-row {
    display: block;
    width: 100%;
    margin-bottom: 2px;
    padding: 6px 8px;
    border-radius: 4px;
    text-align: left;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    cursor: pointer;
    transition: background 0.18s ease;
}

.tm-item-row:hover {
    background: #f7f8fa;
}

.tm-item-row--picked {
    background: var(--tm-active-bg);
    font-weight: 500;
    color: var(--tm-accent);
}

.tm-cart-card {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
}

.tm-cart-card:last-child {
    margin-bottom: 0;
}

.tm-tag {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    background: #f7f8fa;
    font-size: 12px;
    color: #666;
}

.tm-input {
    height: 40px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    font-size: 14px;
    color: #666;
    outline: none;
    transition: border-color 0.18s ease;
}

.tm-input:focus {
    border-color: #060c3b;
}

/* 商品/服务：一行三列 */
.tm-query-items-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 767px) {
    .tm-query-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479px) {
    .tm-query-items-grid {
        grid-template-columns: 1fr;
    }
}

.tm-query-item {
    display: flex;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    color: #666;
}

.tm-query-item__seq {
    flex-shrink: 0;
    display: flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9e9e9;
    border-radius: 4px;
    background: #f7f8fa;
    font-size: 12px;
    font-weight: 600;
    color: #060c3b;
}

.tm-query-group-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid #e9e9e9;
    text-align: left;
    font-size: 14px;
    color: #666;
    background: #fff;
    cursor: pointer;
    transition: background 0.18s ease;
}

.tm-query-group-btn:last-child {
    border-bottom: 0;
}

.tm-query-group-btn:hover {
    background: var(--tm-hover-bg);
}

.tm-query-group-btn--active {
    background: var(--tm-active-bg);
    font-weight: 600;
    color: var(--tm-accent);
}

.tm-desc-box {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #f7f8fa;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.tm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.tm-choice-toggle {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
}

.tm-choice-toggle button {
    padding: 8px 16px;
    font-size: 14px;
    border: 0;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.tm-choice-toggle button + button {
    border-left: 1px solid #e9e9e9;
}

.tm-choice-toggle button.is-on {
    background: #060c3b;
    color: #fff;
}

.tm-empty {
    padding: 40px 16px;
    text-align: center;
    font-size: 14px;
    color: #888;
}

.tm-keyword {
    border-radius: 2px;
    background: #fef08a;
    padding: 0 2px;
}
