/* Tools platform styles. Self-contained (tool pages load only this file,
   not blog.css) but deliberately reuses the same class names/visual
   language as blog.css (breadcrumb, page-title, cta, related-list) for a
   consistent look across the site -- see includes/tools/render.php. */

/* ---------------------------------------------------------------------
   Breadcrumb (identical to blog.css .blog-breadcrumb)
--------------------------------------------------------------------- */
.blog-breadcrumb { margin: 6rem 0 1.5rem; }
.blog-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; font-size: .875rem; color: var(--text-light); }
.blog-breadcrumb li { display: flex; align-items: center; }
.blog-breadcrumb a { color: var(--text-light); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--primary-color); text-decoration: underline; }
.blog-breadcrumb-sep { margin: 0 .5rem; color: var(--border-color); }
.blog-breadcrumb [aria-current="page"] { color: var(--text-dark); font-weight: 600; }

.blog-archive-kicker { display: block; color: var(--primary-color); font-weight: 700; text-transform: uppercase; font-size: .8125rem; letter-spacing: .08em; margin-bottom: .75rem; }

/* ---------------------------------------------------------------------
   Tool hero
--------------------------------------------------------------------- */
.tools-detail-container { max-width: 52rem; }
.tool-hero { margin-bottom: 2.5rem; }
.tool-trust-badges {
    display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
    list-style: none; margin: 1.5rem 0 0; padding: 0;
}
.tool-trust-badges li {
    display: flex; align-items: center; gap: .4rem;
    font-size: .875rem; font-weight: 600; color: var(--text-light);
}
.tool-trust-badges i { width: 16px; height: 16px; color: var(--primary-color); }

/* ---------------------------------------------------------------------
   Tool app: dropzone, options, queue, results
--------------------------------------------------------------------- */
.tool-app {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.tool-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 1.25rem;
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
}
.tool-dropzone:hover,
.tool-dropzone:focus-visible {
    border-color: var(--primary-color);
    background: var(--bg-gray);
    outline: none;
}
.tool-dropzone.is-dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, .06);
}
.tool-dropzone-icon { width: 40px; height: 40px; color: var(--primary-color); margin-bottom: 1rem; }
.tool-dropzone-text { color: var(--text-dark); margin: 0 0 .5rem; line-height: 1.6; }
.tool-dropzone-hint { color: var(--text-light); font-size: .8125rem; margin: 0; }
.tool-dropzone-status { min-height: 1.2rem; margin-top: .75rem; font-size: .875rem; color: var(--primary-dark); text-align: center; }

.tool-options {
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-gray);
    border-radius: 1rem;
}
.tool-options:empty { display: none; margin: 0; padding: 0; }
.tool-option { display: flex; flex-direction: column; gap: .4rem; font-size: .875rem; }
.tool-option label { font-weight: 600; color: var(--text-dark); }
.tool-option input[type="range"] { width: 200px; }
.tool-option input[type="color"] { width: 48px; height: 32px; border: none; border-radius: .4rem; cursor: pointer; }

.tool-process-btn {
    width: 100%;
    margin-top: .5rem;
    justify-content: center;
}
.tool-process-btn:disabled { opacity: .5; cursor: not-allowed; }

.tool-queue-list {
    list-style: none; margin: 1.5rem 0 0; padding: 0;
    display: flex; flex-direction: column; gap: .5rem;
}
.tool-queue-item {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .75rem 1rem;
    background: var(--bg-gray);
    border-radius: .75rem;
    font-size: .875rem;
}
.tool-queue-name { color: var(--text-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-queue-status { color: var(--text-light); white-space: nowrap; }
.tool-queue-item-done .tool-queue-status { color: #059669; }
.tool-queue-item-error .tool-queue-status { color: #dc2626; }

.tool-results { margin-top: 1.5rem; }
.tool-results-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.tool-result-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .9rem 1.1rem;
    background: var(--bg-gray);
    border-radius: .85rem;
    font-size: .875rem;
}
.tool-result-row i { width: 18px; height: 18px; flex-shrink: 0; color: #059669; }
.tool-result-row-error i { color: #dc2626; }
.tool-result-name { font-weight: 600; color: var(--text-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.tool-result-meta { color: var(--text-light); flex: 1; }
.tool-result-error { color: #dc2626; flex: 1; }
.tool-result-download {
    display: inline-flex; align-items: center; gap: .3rem;
    color: var(--primary-color); font-weight: 700; text-decoration: none;
    white-space: nowrap;
}
.tool-result-download i { width: 16px; height: 16px; color: var(--primary-color); }

.tool-signup-hint {
    margin-top: 1.25rem;
    font-size: .8125rem;
    color: var(--text-light);
    text-align: center;
}
.tool-signup-hint a { color: var(--primary-color); font-weight: 600; }

/* ---------------------------------------------------------------------
   CTA (identical to blog.css .blog-cta)
--------------------------------------------------------------------- */
.blog-cta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    margin: 2rem 0 0;
    padding: 2rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}
.blog-cta[hidden] { display: none; }
.blog-cta-text h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: .4rem; }
.blog-cta-text p { opacity: .92; margin: 0; }
.blog-cta-button {
    display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0;
    padding: .9rem 1.6rem;
    background: #fff; color: var(--primary-color);
    border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.blog-cta-button i { width: 18px; height: 18px; }

/* ---------------------------------------------------------------------
   How-to / content / FAQ
--------------------------------------------------------------------- */
.tool-how-to { margin-bottom: 2.5rem; }
.tool-how-to h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1rem; }
.tool-how-to ol { padding-left: 1.4rem; color: var(--text-dark); line-height: 1.9; }
.tool-how-to li { margin-bottom: .5rem; }

.tool-content { color: var(--text-dark); line-height: 1.8; font-size: 1.0625rem; margin-bottom: 2.5rem; }
.tool-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; color: var(--text-dark); }
.tool-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 .75rem; color: var(--text-dark); }
.tool-content p { margin-bottom: 1.25rem; }
.tool-content ul { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.tool-content li { margin-bottom: .4rem; }
.tool-content a { color: var(--primary-color); text-decoration: underline; }

.tool-faq { margin-bottom: 2.5rem; }
.tool-faq h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1rem; }
.tool-faq-item {
    background: var(--bg-gray);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
}
.tool-faq-item summary {
    cursor: pointer; font-weight: 700; color: var(--text-dark);
    list-style: none;
}
.tool-faq-item summary::-webkit-details-marker { display: none; }
.tool-faq-item summary::after { content: '+'; float: right; color: var(--primary-color); font-weight: 800; }
.tool-faq-item[open] summary::after { content: '\2212'; }
.tool-faq-item p { margin: .75rem 0 0; color: var(--text-light); line-height: 1.7; }

/* ---------------------------------------------------------------------
   Tool cards (hub + related-tools grid)
--------------------------------------------------------------------- */
.tool-category-section { margin-bottom: 3rem; }
.tool-category-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1.25rem; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.tool-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all .2s ease;
}
.tool-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-card-link { display: block; padding: 1.5rem; color: inherit; text-decoration: none; }
.tool-card-category { display: block; color: var(--primary-color); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.tool-card-title { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin-bottom: .5rem; }
.tool-card-desc { color: var(--text-light); font-size: .9rem; line-height: 1.5; margin-bottom: 1rem; }
.tool-card-cta { display: inline-flex; align-items: center; gap: .4rem; color: var(--primary-color); font-weight: 700; font-size: .875rem; }
.tool-card-cta i { width: 16px; height: 16px; }

/* ---------------------------------------------------------------------
   Related posts list (identical to blog.css .blog-related-list)
--------------------------------------------------------------------- */
.tool-related { margin-bottom: 2.5rem; }
.tool-related h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1.25rem; }
.blog-related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.blog-related-list a {
    display: block; padding: .9rem 1.1rem;
    background: var(--bg-gray); border-radius: .75rem;
    color: var(--text-dark); font-weight: 600; text-decoration: none;
    border: 2px solid transparent; transition: all .2s ease;
}
.blog-related-list a:hover { border-color: var(--primary-color); transform: translateX(4px); }

.blog-empty { padding: 3rem 1rem; text-align: center; color: var(--text-light); font-size: 1.05rem; }

@media (max-width: 640px) {
    .tool-app { padding: 1.25rem; }
    .tools-grid { grid-template-columns: 1fr; }
    .blog-cta { flex-direction: column; align-items: flex-start; }
    .blog-cta-button { width: 100%; justify-content: center; }
    .tool-result-row { flex-wrap: wrap; }
    .tool-result-name { max-width: 100%; }
}

/* ---------------------------------------------------------------------
   'form' ui_type tools (calculators, validators, planners -- no file
   involved). See tool-page.php's #toolFormApp branch.
--------------------------------------------------------------------- */
.tool-form-input {
    padding: .75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: .75rem;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    max-width: 320px;
}
#toolFormApp select.tool-form-input,
#toolFormApp select#platformSelect {
    padding: .75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: .75rem;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    max-width: 320px;
    background: var(--bg-white);
}
.tool-form-hint { color: var(--text-light); font-size: .8125rem; margin: .5rem 0 0; }
.tool-form-disclaimer { display: flex; align-items: flex-start; gap: .4rem; margin-top: 1.5rem; }
.tool-form-disclaimer i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--primary-color); }
.tool-form-disclaimer a { color: var(--primary-color); }

.tool-check-result {
    display: flex; align-items: flex-start; gap: .75rem;
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 1rem;
    font-size: .9375rem;
    line-height: 1.6;
}
.tool-check-result i { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.tool-check-ok { background: #dcfce7; color: #166534; }
.tool-check-ok i { color: #16a34a; }
.tool-check-fail { background: #fee2e2; color: #991b1b; }
.tool-check-fail i { color: #dc2626; }
.tool-check-note { margin-top: .75rem; font-size: .8125rem; opacity: .85; }

.tool-check-table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.tool-check-table td, .tool-check-table th {
    padding: .6rem .75rem;
    border-bottom: 1px solid rgba(0,0,0,.08);
    text-align: left;
    font-size: .9375rem;
}
.tool-check-table th { font-weight: 700; color: var(--text-dark); }
.tool-timeline-table { background: var(--bg-white); border-radius: .75rem; overflow: hidden; }
.tool-timeline-release td { background: var(--bg-gray); }

.tool-cover-checklist { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.tool-cover-check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.tool-cover-check i { width: 16px; height: 16px; flex-shrink: 0; }
.tool-cover-check-ok i { color: #16a34a; }
.tool-cover-check-fail i { color: #dc2626; }
.tool-cover-check-neutral i { color: var(--text-light); }
.tool-check-table td.tool-cover-check-ok { color: #16a34a; font-weight: 600; }
.tool-check-table td.tool-cover-check-fail { color: #dc2626; font-weight: 600; }
.tool-check-neutral-block { background: var(--bg-gray); color: var(--text-dark); }
.tool-check-neutral-block i { color: var(--primary-color); }

@media (max-width: 640px) {
    .tool-form-input,
    #toolFormApp select.tool-form-input { max-width: 100%; }
}
