/* ============================================================
   Shared styles for the four lookup tool pages
   (name-in-chinese / english-to-chinese / chinese-phrases /
    chinese-menu). Palette follows css/style.css:
   accent #cc0000 · links #0055aa · grays #333/#666/#f5f5f5
   ============================================================ */

.tool-intro {
    max-width: 860px;
    margin: 0 auto 18px;
    color: #333;
    line-height: 1.7;
}

.tool-search-wrap {
    max-width: 640px;
    margin: 22px auto 10px;
    position: relative;
}

.tool-search {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 44px 14px 18px;
    font-size: 18px;
    border: 2px solid #0055aa;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #222;
}

.tool-search:focus {
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, .12);
}

.tool-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #f0f0f0;
    color: #666;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: none;
}

.tool-search-clear:hover {
    background: #ddd;
}

.tool-status {
    max-width: 860px;
    margin: 4px auto 14px;
    color: #666;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

/* A–Z index */
.tool-az {
    max-width: 860px;
    margin: 0 auto 18px;
    text-align: center;
    line-height: 2;
}

/* Category chips */
.tool-cats {
    max-width: 860px;
    margin: 0 auto 8px;
    text-align: center;
    line-height: 2;
    font-size: 15px;
}

.tool-cats-label {
    color: #666;
    margin-right: 4px;
}

.tool-cats a {
    display: inline-block;
    padding: 2px 10px;
    margin: 2px;
    background: #f0f0f0;
    color: #0055aa;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
}

.tool-cats a:hover {
    background: #0055aa;
    color: #fff;
}

.tool-badge.cat {
    background: #eef7ee;
    color: #2e7d32;
}

.tool-play-sm {
    width: 30px;
    height: 30px;
    font-size: 13px;
    vertical-align: middle;
    margin-left: 6px;
}

.tool-az a {
    display: inline-block;
    min-width: 26px;
    padding: 1px 5px;
    margin: 1px;
    color: #0055aa;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.tool-az a:hover {
    background: #f0f0f0;
}

.tool-az a.active {
    background: #0055aa;
    color: #fff;
}

/* Result cards */
.tool-results {
    max-width: 860px;
    margin: 0 auto 26px;
}

.tool-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.tool-card-main {
    flex: 1;
    min-width: 0;
}

.tool-entry-name {
    font-size: 20px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.tool-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: normal;
    padding: 1px 8px;
    border-radius: 10px;
    vertical-align: 2px;
    margin-left: 8px;
}

.tool-badge.m { background: #e8f0fe; color: #0055aa; }
.tool-badge.f { background: #fdecec; color: #cc0000; }

.tool-sense {
    margin-bottom: 8px;
}

.tool-sense:last-child {
    margin-bottom: 0;
}

.tool-sense-num {
    color: #cc0000;
    font-weight: bold;
    margin-right: 6px;
}

.tool-syl {
    display: inline-block;
    text-align: center;
    margin-right: 10px;
    padding: 5px 9px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    min-width: 44px;
}

.tool-syl .py {
    display: block;
    color: #cc0000;
    font-size: 15px;
    line-height: 1.3;
}

.tool-syl .hz {
    display: block;
    color: #222;
    font-size: 22px;
    line-height: 1.4;
}

.tool-play {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #0055aa;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.tool-play:hover { background: #00417f; }
.tool-play.playing { background: #cc0000; }
.tool-play[disabled] {
    background: #ccc;
    cursor: default;
}

.tool-more {
    text-align: center;
    color: #666;
    padding: 10px 0 30px;
}

/* Loading state */
.tool-loading {
    text-align: center;
    color: #666;
    padding: 40px 0;
    font-size: 16px;
}

@media (max-width: 600px) {
    .tool-card { padding: 12px; gap: 10px; }
    .tool-entry-name { font-size: 17px; }
    .tool-syl { padding: 4px 6px; margin-right: 6px; min-width: 38px; }
    .tool-syl .hz { font-size: 19px; }
    .tool-play { width: 42px; height: 42px; }
}

/* FAQ block */
.tool-faq {
    max-width: 860px;
    margin: 10px auto 30px;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 6px 20px 14px;
}

.tool-faq h3 {
    color: #333;
    font-size: 16px;
    margin: 14px 0 6px;
}

.tool-faq p {
    color: #555;
    margin: 0 0 8px;
    line-height: 1.6;
}
