/* =========================================
   T-DEV TOOL PAGE
========================================= */

.tool-page {
    width: 100%;
}

.tool-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 80px;
}


/* Breadcrumb */

.tool-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;

    font-size: 14px;
}

.tool-breadcrumb a {
    text-decoration: none;
}

.tool-breadcrumb span:last-child {
    font-weight: 600;
}


/* Header */

.tool-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.tool-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
}

.tool-description {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
}




/* Critical layout reservations for CLS on tool pages.
 * These rules intentionally mirror the final responsive dimensions used by
 * the current ad slot, header logo and JSON Formatter so late-loading
 * assets/styles cannot move the surrounding layout.
 */

/* Top Ad: reserve the final box before AdSense initializes. */
.tdev-global-ad-top {
    width: 100%;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    margin: 0 0 40px;
    display: block;
    overflow: hidden;
    box-sizing: border-box;
}

.tdev-global-ad-top .adsbygoogle {
    display: block !important;
    width: 100% !important;
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
}

/* Header logo: reserve its responsive box on tool pages. */
body.single-tdev_tool .site-logo {
    width: 205px;
    min-width: 205px;
    height: 48px;
    flex: 0 0 205px;
}

body.single-tdev_tool .site-logo img {
    display: block;
    width: 205px !important;
    height: 48px !important;
    aspect-ratio: 205 / 48;
}

/* JSON Formatter: establish the final panel geometry in the earliest
 * tool-page stylesheet. The generated tool CSS keeps the same values. */
.tdev-json-tool .tdev-jf-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 520px;
}

.tdev-json-tool .tdev-jf-panel {
    min-width: 0;
    min-height: 516px;
}

.tdev-json-tool .tdev-jf-panel-head {
    min-height: 36px;
}

.tdev-json-tool .tdev-jf-editor-wrap {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    height: 480px;
}

.tdev-json-tool .tdev-jf-output {
    height: 480px;
}

@media (max-width: 900px) {
    .tdev-json-tool .tdev-jf-panels {
        grid-template-columns: 1fr;
    }

    .tdev-json-tool .tdev-jf-panel {
        min-height: 416px;
    }

    .tdev-json-tool .tdev-jf-editor-wrap {
        grid-template-columns: 44px minmax(0, 1fr);
        height: 380px;
    }

    .tdev-json-tool .tdev-jf-output {
        height: 380px;
    }
}

@media (max-width: 768px) {
    body.single-tdev_tool .site-logo {
        width: 170px;
        min-width: 170px;
        height: 40px;
        flex-basis: 170px;
    }

    body.single-tdev_tool .site-logo img {
        width: 170px !important;
        height: 40px !important;
        aspect-ratio: 17 / 4;
    }
}

@media (max-width: 600px) {
    .tdev-json-tool .tdev-jf-panel {
        min-height: 400px;
    }

    .tdev-json-tool .tdev-jf-panel-head {
        min-height: 40px;
    }

    .tdev-json-tool .tdev-jf-editor-wrap {
        grid-template-columns: 38px minmax(0, 1fr);
        height: 360px;
    }

    .tdev-json-tool .tdev-jf-output {
        height: 360px;
    }
}

@media (max-width: 480px) {
    body.single-tdev_tool .site-logo {
        width: 150px;
        min-width: 150px;
        height: 35px;
        flex-basis: 150px;
    }

    body.single-tdev_tool .site-logo img {
        width: 150px !important;
        height: 35px !important;
        aspect-ratio: 30 / 7;
    }
}

@media (max-width: 380px) {
    .tdev-json-tool .tdev-jf-panel {
        min-height: 370px;
    }

    .tdev-json-tool .tdev-jf-editor-wrap {
        grid-template-columns: 34px minmax(0, 1fr);
        height: 330px;
    }

    .tdev-json-tool .tdev-jf-output {
        height: 330px;
    }
}

/* Global Ad Slots */

.tdev-global-ad {
    width: 100%;
    min-height: 250px;
    margin: 0 0 40px;
    display: block;
}

.tdev-global-ad .adsbygoogle {
    width: 100%;
}

@media (min-width: 769px) {

    .tdev-global-ad {
        min-height: 250px;
    }

}

/* JSON Formatter workspace reservation */
/*
 * The JSON Formatter's generated tool CSS creates a large, fixed-height
 * editor/output area. Reserve the final workspace height up front so the
 * tool panels do not move when the tool stylesheet/initialisation finishes.
 * This is scoped to JSON Formatter only and does not affect other tools.
 */
.tool-container-json-formatter .tool-workspace {
    min-height: 720px;
}

@media (min-width: 601px) and (max-width: 900px) {
    .tool-container-json-formatter .tool-workspace {
        min-height: 1100px;
    }
}

@media (max-width: 600px) {
    .tool-container-json-formatter .tool-workspace {
        min-height: 1450px;
    }
}


/* Workspace */

.tool-workspace {
    width: 100%;
    min-height: 360px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: var(--surface);

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

    margin-bottom: 60px;
}

.tool-workspace-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tool-workspace-inner h2 {
    margin-bottom: 10px;
}


/* Content */

.tool-content {
    max-width: 900px;
    margin: 0 auto;
}

.tool-section {
    margin-top: 50px;
}

.tool-section h2 {
    margin-bottom: 18px;
}

.tool-section li {
    margin-bottom: 10px;
}


/* Related tools */

.related-tools {
    min-height: 100px;
}


/* FAQ */

.tool-faq {
    min-height: 100px;
}


/* Mobile */

@media (max-width: 768px) {

    .tool-container {
        width: min(100% - 24px, 1200px);
        padding-top: 24px;
    }

    .tool-breadcrumb {
        font-size: 13px;
        margin-bottom: 22px;
    }

    .tool-description {
        font-size: 16px;
    }

    .tool-workspace {
        min-height: 300px;
        border-radius: 16px;
    }

}

/* =========================================
   TOOL CONTENT LISTS
========================================= */

.tool-content ol,
.tool-content ul {
    margin: 0 0 24px;
    padding-left: 28px;
}

.tool-content ol {
    list-style-position: outside;
}

.tool-content ul {
    list-style-position: outside;
}

.tool-content li {
    margin-bottom: 10px;
    padding-left: 4px;
}

@media (max-width: 480px) {

    .tool-container {
        width: calc(100% - 24px);
        padding-top: 20px;
        padding-bottom: 60px;
    }

    .tool-content ol,
    .tool-content ul {
        padding-left: 26px;
    }

    .tool-content li {
        padding-left: 2px;
    }

}

/* =========================================================
   T-DEV TOOL CONTENT
   Gutenberg content spacing
   ========================================================= */

.tool-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Paragraphs */
.tool-content p {
    margin: 0 0 20px;
    line-height: 1.75;
}

/* Main content headings */
.tool-content h2 {
    margin: 40px 0 18px;
    line-height: 1.3;
}

.tool-content h3 {
    margin: 28px 0 12px;
    line-height: 1.4;
}

/* First heading should not create huge top spacing */
.tool-content > h2:first-child,
.tool-content > h3:first-child {
    margin-top: 0;
}

/* Lists */
.tool-content ul,
.tool-content ol {
    margin: 0 0 24px;
    padding-left: 28px;
}

.tool-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Paragraph immediately before a list */
.tool-content p + ul,
.tool-content p + ol {
    margin-top: 0;
}

/* List immediately followed by heading */
.tool-content ul + h2,
.tool-content ol + h2 {
    margin-top: 36px;
}

.tool-content ul + h3,
.tool-content ol + h3 {
    margin-top: 28px;
}

/* Links */
.tool-content a {
    text-decoration: underline;
}

/* Blockquotes */
.tool-content blockquote {
    margin: 28px 0;
    padding: 16px 20px;
    border-left: 4px solid currentColor;
    line-height: 1.7;
}

/* Images */
.tool-content img {
    max-width: 100%;
    height: auto;
}

/* Tables */
.tool-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
}

.tool-content th,
.tool-content td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

/* Mobile */
@media (max-width: 768px) {

    .tool-content {
        width: 100%;
    }

    .tool-content h2 {
        margin-top: 32px;
        margin-bottom: 16px;
    }

    .tool-content h3 {
        margin-top: 24px;
        margin-bottom: 10px;
    }

    .tool-content p {
        margin-bottom: 16px;
        line-height: 1.7;
    }

    .tool-content ul,
    .tool-content ol {
        padding-left: 26px;
        margin-bottom: 20px;
    }

    .tool-content li {
        margin-bottom: 7px;
    }

    .tool-content blockquote {
        margin: 24px 0;
        padding: 14px 16px;
    }

    .tool-content table {
        display: block;
        overflow-x: auto;
    }
}