/* Block detail pages: /blocks/{slug} */

/* Cards */
.wiki-panel {
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 18px;
    box-shadow: 0 3px 0 var(--cartoon-line);
    color: var(--cartoon-ink);
}

.entry-hero-card {
    font-family: 'Baloo 2', Arial, sans-serif;
}

/* Hero: icon frame, title and tags */
.entry-icon-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
}

.entry-icon-frame img {
    image-rendering: pixelated;
}

.entry-display h1,
.entry-display .h3 {
    font-family: 'Baloo 2', Arial, sans-serif;
    font-weight: 600;
    color: var(--cartoon-ink);
}

/* Category and type tags: solid colour pills */
.entry-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: 0;
    background: #e9edf3;
    color: var(--cartoon-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.entry-category-badge:not(.entry-dimension-badge):hover {
    transform: translateY(-1px);
    color: var(--cartoon-ink);
}

.entry-type-badge-block {
    background: var(--gx-blue);
    color: #fff;
}

.entry-type-badge-item {
    background: #2f6fd6;
    color: #fff;
}

/* Give command */
.block-give-command {
    display: inline-block;
    max-width: 100%;
}

.block-give-row {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border-radius: 12px;
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
}

.block-give-code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--cartoon-ink);
    background: none;
}

.block-give-copy {
    height: 30px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #e0822a;
    border: 1px solid #a85a14;
    border-radius: 9px;
    box-shadow: 0 2px 0 #a85a14;
    cursor: pointer;
    transition: background 0.15s ease;
}

.block-give-copy:hover {
    background: #ea9240;
}

/* Section headings and text */
.detail-panel-use,
.detail-panel-how,
.detail-panel-props,
.entry-sidebar-card {
    padding: 24px;
}

.entry-markdown-title {
    font-family: 'Baloo 2', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--cartoon-ink);
}

.entry-markdown h3 {
    font-family: 'Baloo 2', Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--gx-blue-dark);
}

.entry-markdown p,
.entry-markdown li {
    font-size: 15px;
    line-height: 1.6;
}

/* Each heading and its text sit in a soft box */
.info-section {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f7faf3;
    border: 2px solid var(--cartoon-line);
}

.info-section > h3:first-child {
    margin-top: 0;
}

/* Side panel: block properties */
.properties-drawer-heading {
    margin: 0 0 14px;
    font-family: 'Baloo 2', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--cartoon-ink);
}

/* No second box inside the side panel: the rows are the boxes */
.guide-sidebar .info-section {
    padding: 0;
    border: 0;
    background: none;
}

.block-properties {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* One row per property: label on the left, value on the right */
.block-properties-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #f7faf3;
    border: 2px solid var(--cartoon-line);
}

.block-properties dt {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--cartoon-ink);
}

.block-properties dd {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--cartoon-ink);
    text-align: right;
}

.property-icon {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    image-rendering: pixelated;
}

.property-info {
    margin-left: 6px;
    color: var(--gx-muted);
    font-size: 13px;
    cursor: help;
}

/* Value chips: each value gets a solid colour */
.value-yes,
.value-no,
.value-unknown {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.value-yes { background: var(--gx-blue); }
.value-no { background: #d93654; }
.value-unknown { background: #6b7385; }

.value-tool-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    border-radius: 9px;
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
}

.value-tool-icon img {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

/* Trading list */
.trading-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trading-list li {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    font-size: 14px;
}

.trading-value {
    font-weight: 700;
}

/* Related chips */
.section-related-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.section-related-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px 4px 4px;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: var(--cartoon-ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.section-related-chip,
.section-related-chip:focus,
.section-related-chip:focus-visible,
.section-related-chip-icon {
    outline: none;
    box-shadow: none;
}

.section-related-chip:hover {
    transform: none;
    background: transparent;
    border-color: transparent;
    color: var(--cartoon-ink);
}

/* Icon sits in a soft green card slot, matching the site's cartoon cards */
.section-related-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
    color: var(--gx-blue-dark);
    font-size: 18px;
}

.section-related-chip-icon img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.section-related-chip-icon.is-placeholder {
    background: #fff;
    color: #8a9a7e;
}

/* Buttons used on the page: match the Search the wiki button */
.btn-wiki {
    font-weight: 700;
    color: #fff;
    background: var(--gx-blue);
    border: 1px solid var(--gx-blue-dark);
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--gx-blue-dark);
}

.btn-wiki:hover {
    color: #fff;
    background: #58b92e;
}

.btn-outline-wiki {
    font-weight: 700;
    color: var(--gx-blue-dark);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 12px;
}

.btn-outline-wiki:hover {
    background: var(--cartoon-soft);
    border-color: var(--gx-blue);
    color: var(--gx-blue-dark);
}

/* Expert chat tag */
.kid-sign {
    padding: 6px 14px;
    border: 0;
    border-radius: 10px;
    background: #8e5cd9;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* The side panel scrolls with the page, so it never slides over the content */
.guide-sidebar .entry-sidebar-card {
    position: static;
}

@media (max-width: 575.98px) {
    .detail-panel-use,
    .detail-panel-how,
    .detail-panel-props,
    .entry-sidebar-card,
    .entry-hero-card {
        padding: 18px !important;
    }

    .block-give-code {
        font-size: 12px;
    }
}

/* Narrower page: keeps the wiki content and side panel closer together */
.catalog-detail-page main.container {
    max-width: 1140px;
}

/* Report Incorrect Info button, in the side panel */
.catalog-detail-page .properties-drawer-toggle-red {
    margin-top: 16px;
}

/* Report drawer fields */
.properties-drawer .form-select {
    height: 44px;
    border: 2px solid #f5c2cc;
    border-radius: 12px;
    font-size: 15px;
    color: var(--cartoon-ink);
}

.properties-drawer .form-select:focus {
    border-color: #d93654;
    box-shadow: 0 0 0 4px rgba(217, 54, 84, 0.18);
}

.properties-drawer #reportEmail {
    height: 44px;
    border: 2px solid #f5c2cc;
    border-radius: 12px;
    font-size: 15px;
}

/* The report button stays solid red; .btn-wiki above would otherwise turn it green */
.btn-wiki.properties-drawer-toggle-red {
    color: #fff;
    background: #d93654;
    border-color: #b82c45;
    box-shadow: 0 3px 0 #b82c45;
}

.btn-wiki.properties-drawer-toggle-red:hover {
    color: #fff;
    background: #b82c45;
    border-color: #9c2339;
    box-shadow: 0 4px 0 #9c2339;
}

/* Give command uses the site font */
.block-give-code {
    font-family: 'Baloo 2', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

/* Copy feedback: the button turns green and reads "Copied!" for a moment */
.block-give-copy {
    min-width: 72px;
    transition: background 0.15s ease;
}

.block-give-copy.copied {
    font-size: 0;
    background: #a85a14;
    border-color: #7a400e;
    box-shadow: 0 2px 0 #7a400e;
}

.block-give-copy.copied::after {
    content: 'Copied!';
    font-size: 13px;
    font-weight: 700;
}

/* Give command is regular weight, not bold */
.block-give-code {
    font-weight: 400;
}

/* Section titles on block pages (What is / How to get / How to use): solid green pill */
.catalog-detail-page .entry-markdown-title {
    display: inline-flex;
    align-items: center;
    margin: 0 0 14px;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--gx-blue);
    box-shadow: 0 3px 0 var(--gx-blue-dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

/* Block type and category badges: same shape as the mob badges, with a solid colour each */
.catalog-detail-page .entry-category-badge.entry-type-badge,
.catalog-detail-page .entry-category-badge.entry-category-badge-wood,
.catalog-detail-page .entry-category-badge[class*="entry-category-badge-"] {
    height: 38px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid var(--badge-dark, var(--gx-blue-dark));
    box-shadow: 0 2px 0 var(--badge-dark, var(--gx-blue-dark));
    color: #fff;
    background: var(--badge-color, var(--gx-blue));
}

.catalog-detail-page .entry-category-badge + .entry-category-badge {
    margin-left: 8px;
}

.entry-type-badge-block { --badge-color: #4caf24; --badge-dark: #2e7d12; }
.entry-type-badge-item { --badge-color: #2f6fd6; --badge-dark: #1d4fa3; }

.entry-category-badge-wood { --badge-color: #a0703a; --badge-dark: #6f4a22; }
.entry-category-badge-redstone { --badge-color: #d93654; --badge-dark: #9c2339; }
.entry-category-badge-functional { --badge-color: #e0822a; --badge-dark: #a85a14; }
.entry-category-badge-decoration { --badge-color: #f48fb1; --badge-dark: #b8577f; color: var(--cartoon-ink); }
.entry-category-badge-plants { --badge-color: #6fcf97; --badge-dark: #2e8a55; color: var(--cartoon-ink); }
.entry-category-badge-utility { --badge-color: #6b7385; --badge-dark: #3e4453; }
.entry-category-badge-building-blocks { --badge-color: #8c8c8c; --badge-dark: #555; }
.entry-category-badge-lighting { --badge-color: #fcd45c; --badge-dark: #b8921f; color: var(--cartoon-ink); }
.entry-category-badge-ores-minerals { --badge-color: #2f6fd6; --badge-dark: #1d4fa3; }
.entry-category-badge-nether { --badge-color: #b5462a; --badge-dark: #7a2d19; }
.entry-category-badge-rare-special { --badge-color: #8e5cd9; --badge-dark: #5f3aa6; }
.entry-category-badge-stone { --badge-color: #7d8594; --badge-dark: #4d5462; }
.entry-category-badge-natural-blocks { --badge-color: #4caf24; --badge-dark: #2e7d12; }
.entry-category-badge-end { --badge-color: #3b3b58; --badge-dark: #22223a; }

/* Site logo above the block (same size and spacing as the home and blocks pages) */
.block-page-logo-link {
    display: block;
    margin: 8px auto 28px;
    line-height: 0;
}

.block-page-logo-link .hw-logo {
    display: block;
    width: 560px;
    max-width: 92vw;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 10px rgba(31, 42, 68, 0.2));
}

/* The actions row under the logo adds no extra gap of its own, so the logo gap matches the blocks page */
.block-page-logo-link + nav {
    margin-bottom: 0 !important;
}

/* Block type badge matches the Blocks button on the home page (teal) */
.catalog-detail-page .entry-category-badge.entry-type-badge.entry-type-badge-block {
    background: #1f9d8f;
    border-color: #137065;
    box-shadow: 0 2px 0 #137065;
    color: #fff;
}
