/**
 * File: css/admin.css
 * Version: 0.0.12
 * Description: Enhanced admin styles with Gorilla DevOps framework including 22 UI components: text generation box with progress bar, stats badges, compact toggle layout, performance badges, button groups, tooltips, FAQ accordions, card grid (Site Health style), and more. Added spacing utility classes (.gd-mt-*, .gd-mb-*, .gd-ml-*, .gd-mr-*, .gd-my-*), code block classes (.gd-code-block, .gd-code-block-dark), and status color classes (.gd-text-success, .gd-text-error, etc.) to replace inline styles.
 */

/* ===================================================================
   WordPress Admin Page Overrides

   Scoped on :has(#gd-admin), NOT on an admin body class such as
   .settings_page_<slug>. That body class is derived from the menu hook
   suffix, so it is wrong two ways at once:

     1. It changes with GORILLA_CACHE_MENU_LOCATION —
        toplevel_page_ / settings_page_ / tools_page_ /
        woocommerce_page_ — so any hardcoded variant is dead for the
        other three (including 'top-level', which is the default).
     2. It embeds the plugin slug, so it breaks whenever the slug
        changes.

   #gd-admin is the wrapper display_plugin_admin_page() always renders,
   which is stable on both counts. These rules only ever load on our own
   screen regardless: enqueue_styles() bails on every other screen.
   =================================================================== */

#wpbody-content:has(#gd-admin) {
    margin-top: 5px;
}

#wpbody-content:has(#gd-admin) > .notice {
    margin: 15px auto 15px 2px;
    max-width: 1200px;
    box-sizing: border-box;
}

/* ===================================================================
   Main Container & Layout
   =================================================================== */

#gd-admin {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

#gd-admin > h1 {
    margin-bottom: 30px;
}

.gd-version {
    font-size: 14px;
    font-weight: 400;
    color: #7c8993;
    margin-left: 8px;
}

/* General link styles - removed to not interfere with tab styling
#gd-admin a {
    color: var(--wp-admin-theme-color, #3858e9);
    text-decoration: none;
}

#gd-admin a:hover {
    text-decoration: underline;
} */

.gd-settings-wrap {
    /* Transparent wrapper - no styling needed */
    background: transparent;
    border: none;
    padding: 0;
    box-sizing: border-box;
}

/* ===================================================================
   Tab Navigation (WordPress Standard)
   =================================================================== */

.gd-nav-tab-wrapper {
    border-bottom: 1px solid #dcdcde;
    margin: 0 0 30px 0;
    padding: 0;
}

.gd-nav-tab {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px -1px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333 !important;
    text-decoration: none !important;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: none;
}

.gd-nav-tab:hover {
    color: var(--wp-admin-theme-color, #3858e9) !important;
    background: transparent;
    text-decoration: none !important;
}

.gd-nav-tab:focus {
    outline: none;
    box-shadow: none;
    text-decoration: none !important;
}

/* Keyboard users still see where they are (a mouse click shows no ring). */
.gd-nav-tab:focus-visible {
    outline: 2px solid var(--wp-admin-theme-color, #3858e9);
    outline-offset: 2px;
}

.gd-nav-tab.nav-tab-active {
    color: var(--wp-admin-theme-color, #3858e9) !important;
    background: transparent;
    border-bottom: 3px solid #333;
    margin-bottom: -2px;
    text-decoration: none !important;
}

/* Tab Content */
.gd-tab-content {
    display: none;
}

.gd-tab-content.active {
    display: block;
}

/* ===================================================================
   Sections & Headers
   =================================================================== */

.gd-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    padding: 30px;
}

.gd-section:last-child {
    margin-bottom: 0;
}

.gd-section + .gd-section {
    margin-top: 40px;
}

.gd-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #1e1e1e;
    font-size: 18px;
    font-weight: 600;
}

.gd-section h3:not(.gd-card-header) {
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.gd-section p.description {
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
    margin: 10px 0;
}

/* Dark Section Headers - REMOVED FOR CLEANER DESIGN
 * These created visual clutter with negative margins
 * Use simple h2 tags instead
 */

/* ===================================================================
   Form Elements
   =================================================================== */

.gd-settings-wrap .form-table {
    margin: 0;
    border-collapse: collapse;
}

.gd-settings-wrap .form-table th {
    /* Where the label's first line starts. The help icon uses the same value, so the two can never
       drift apart; rows with a taller field change only this (see "Help icons" below). */
    --gd-label-top: 15px;
    padding: var(--gd-label-top) 30px 15px 0; /* right padding reserves the tooltip-icon column */
    font-size: 13px;
    font-weight: normal;
    min-width: 200px;
    vertical-align: top;
    position: relative;
}

.gd-settings-wrap .form-table tr:has(textarea) th {
    vertical-align: top;
}

.gd-settings-wrap .form-table td {
    position: relative;
    padding: 10px;
    vertical-align: top;
}

.gd-settings-wrap input[type="text"],
.gd-settings-wrap select {
    min-width: 300px;
    margin: 0;
    border: .5px solid #ccc;
}

.gd-settings-wrap textarea {
    width: 100%;
    min-height: 150px;
    border: .5px solid #ccc;
    resize: vertical;
}

/* ===================================================================
   Section Spacing for WordPress Settings API
   ===================================================================

   CRITICAL DESIGN RULE - DO NOT REMOVE OR MODIFY

   Problem: WordPress Settings API generates H2 section titles with margin-top: 0
   causing sections to appear cramped when they follow form tables.

   Solution: Add 40px spacing above H2 headings that immediately follow form tables.
   This creates visual breathing room between sections.

   Selector: .form-table + h2 (adjacent sibling)
   - Targets ONLY H2 elements that immediately follow a .form-table
   - Does NOT affect first H2 in tab (no form-table before it)
   - Works automatically for any number of sections

   Why This Matters:
   - Without this rule, sections appear visually cramped

   Examples:
   - General tab with 3 sections (General Settings, Toggle Settings, Conditional)
   - Any tab using Settings API with multiple add_settings_section() calls

   DO NOT:
   - Remove this rule
   - Reduce spacing below 40px
   - Apply to all H2 elements (breaks first section)

   @since 1.0.17
   =================================================================== */

.gd-settings-wrap .form-table + h2 {
    margin-top: 40px !important;
}

/* ===================================================================
   Toggle Switches (Industry Standard)
   =================================================================== */

.gd-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    font-size: 1px;
    vertical-align: middle;
}

.gd-switch input {
    display: block;
    margin: 0;
    border: none;
    outline: none;
    box-shadow: none;
    opacity: 0;
    width: 0;
    height: 0;
}

.gd-switch input[type=checkbox]:checked::before {
    height: 0;
    width: 0;
}

.gd-slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 50px;
    cursor: pointer;
}

.gd-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    transition: 0.4s;
    border-radius: 50%;
}

.gd-switch input:checked + .gd-slider {
    background-color: var(--wp-admin-theme-color, #3858e9);
}

.gd-switch input:focus + .gd-slider {
    box-shadow: 0 0 1px var(--wp-admin-theme-color, #3858e9);
}

.gd-switch input:focus-visible + .gd-slider {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color, #3858e9);
}

.gd-switch input:checked + .gd-slider:before {
    transform: translateX(20px);
}

/* ===================================================================
   Tooltips (Industry Standard)
   =================================================================== */

/* Title wrapper for flex-based alignment (Professional approach) */
.gd-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Tooltip wrapper - simplified positioning */
.gd-tooltip-wrapper {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 3px;
}

/* Help icons in a settings row: centred on the label's first line, one column for every row.

   The icon is centred by construction, not by a measured offset (a fixed `top` in pixels sat 2.5 to
   3.6px low once WordPress 7 changed the admin text). Its wrapper starts exactly where the label's first
   line starts (--gd-label-top, the th's own top padding) and is exactly one label line tall (1lh, the
   th's line height), and centres the icon inside that box. Whatever the font, icon and label share one
   centre line.

   It sits in a fixed column at the right edge of the label cell (the th reserves right padding, so a long
   label never runs under it), and stays on the label line when a description makes the row tall (th and
   td are vertical-align: top).

   Position with `top`, NOT transform: translateY(...): a transform creates a stacking context that traps
   the hover popup's z-index, so the field cells of later rows draw OVER the open popup ("tooltip behind
   the content"). A plain `top` creates no stacking context.

   Alignment only exists on a rendered screen: measure it in a browser after any change here, never judge it
   by reading this file. */
.gd-settings-wrap .form-table th .gd-tooltip-wrapper {
    position: absolute;
    right: 8px;
    top: var(--gd-label-top);
    height: 1.3em; /* the line height, for a browser without the lh unit */
    height: 1lh;
    display: flex;
    align-items: center;
    float: none;
    margin: 0;
}

/* A field is taller than a line of text, so its label moves down until the two share a centre line: the
   field cell's top padding (10px) plus half of what the field is taller than the label line. The icon
   follows the label through --gd-label-top. Field heights in WordPress 7: a text box, number box or select
   40px, our toggle 28px. A textarea's label stays on its top line (15px). */
.gd-settings-wrap .form-table tr:has(> td > input[type="text"], > td > input[type="number"], > td > input[type="email"], > td > input[type="url"], > td > input[type="password"], > td > select) > th {
    --gd-field-height: 40px;
}

/* Before WordPress 7 a text box, number box or select is 30px tall. WordPress puts the branch on the body
   (branch-6-4 and so on), so the 6.x admins this plugin supports get the shorter height. */
body:is(.branch-6-4, .branch-6-5, .branch-6-6, .branch-6-7, .branch-6-8, .branch-6-9) .gd-settings-wrap .form-table tr:has(> td > input[type="text"], > td > input[type="number"], > td > input[type="email"], > td > input[type="url"], > td > input[type="password"], > td > select) > th {
    --gd-field-height: 30px;
}

.gd-settings-wrap .form-table tr:has(> td > .gd-switch) > th {
    --gd-field-height: 28px;
}

.gd-settings-wrap .form-table tr:has(> td > input[type="text"], > td > input[type="number"], > td > input[type="email"], > td > input[type="url"], > td > input[type="password"], > td > select, > td > .gd-switch) > th {
    --gd-label-top: calc(10px + (var(--gd-field-height) - 1lh) / 2);
}

/* Do not add a `th label + .gd-tooltip-wrapper` rule with `position: relative`: it would pull the
   help icon out of the fixed column above. On Settings API rows the label has no `label` sibling,
   and on hand-written rows the more specific rule above wins anyway. */

.gd-tooltip {
    display: inline-block;
    flex-shrink: 0;
    height: 16px;
    width: 16px;
    vertical-align: middle;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    background: #F0F0F1;
    color: #646970;
    border-radius: 50%;
    text-decoration: none;
}

.gd-tooltip-text {
    display: none;
    position: absolute;
    z-index: 10;
    top: 32px;
    left: -16px;
    width: 300px;
    background-color: #23282d;
    color: #fff;
    padding: 10px;
    border-radius: 3px;
    text-align: left;
    font-size: 12px;
    line-height: 20px;
    font-weight: normal;
}

.gd-tooltip:hover .gd-tooltip-text,
.gd-tooltip:focus .gd-tooltip-text,
.gd-tooltip:focus-within .gd-tooltip-text,
.gd-tooltip-wrapper:hover > .gd-tooltip-text,
.gd-tooltip-wrapper:focus-within > .gd-tooltip-text {
    display: block;
}

.gd-tooltip-text::after {
    content: " ";
    position: absolute;
    top: -6px;
    left: 19px;
    border-width: 0px 4.5px 6px;
    border-style: solid;
    border-color: transparent transparent #23282d transparent;
}

.gd-tooltip-subtext {
    display: block;
    margin-top: 5px;
    text-align: right;
    font-style: italic;
    font-size: 9px;
    line-height: 9px;
    color: rgba(255, 255, 255, 0.9);
}

/* ===================================================================
   Status Cards & Grids
   =================================================================== */

.gd-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 0;
}

.gd-status-card {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 18px;
    text-align: left;
}

/* The two content tiers of a status tile. `.gd-status-value` is the big figure, `.gd-status-label`
   is the small muted caption underneath — the size/weight/case contrast is what gives the tile its
   hierarchy. Colour the value with a `.gd-text-*` utility (e.g. .gd-text-success) when it's a state. */
.gd-status-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #1e1e1e;
}

.gd-status-label {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
}

.gd-status-card.active {
    background: #eff6ff;
    border-left: 4px solid var(--wp-admin-theme-color, #3858e9);
}

.gd-status-card.inactive {
    background: #f3f4f6;
}

.gd-status-card.error {
    background: #fef2f2;
    border-left: 3px solid #dc3232;
}

.gd-status-card h4 {
    margin: 0 0 10px 0;
    color: #1e1e1e;
    font-size: 14px;
    font-weight: 600;
}

.gd-status-card p {
    margin: 0;
    font-size: 13px;
    color: #646970;
}

.gd-status-card strong {
    color: #1e1e1e;
    font-weight: 600;
    display: block;
    font-size: 16px;
}

.gd-status-card small {
    color: #7c8993;
    font-size: 11px;
}

/* Info Grid */
.gd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin: 0;
}

.gd-info-item {
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gd-info-item strong {
    color: #555;
    font-weight: 600;
    margin-right: 10px;
}

.gd-info-item span {
    color: #23282d;
}

/* ===================================================================
   FAQ Accordion System
   =================================================================== */

.gd-faq-section {
    margin: 0;
}

/* Container for FAQ groups with vertical spacing */
.gd-faq-container {
    margin: 20px 0;
}

/* Marker class for conditional field parent rows (used by JS) */
.gd-input-controller {
    /* No default styling - this is a JavaScript hook class */
}

.gd-faq-item {
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Standalone FAQ (not in .gd-faq-section) needs top spacing */
.gd-section > .gd-faq-item {
    margin-top: 20px;
}

/* Highlight targeted FAQ item with smooth animation */
.gd-faq-item:target {
    animation: gd-faq-highlight 2s ease-in-out;
}

@keyframes gd-faq-highlight {
    0% {
        background-color: #fff3cd;
        border-color: #ffc107;
    }
    100% {
        background-color: #fff;
        border-color: #e5e7eb;
    }
}

.gd-faq-question {
    margin: 0;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #23282d;
    border-bottom: 1px solid #1d2327;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.2s ease;
    user-select: none;
}

.gd-faq-question:hover {
    background: #363d45;
    color: #ffffff;
}

.gd-faq-question.expanded {
    background: #363d45;
    color: #ffffff;
}

/* The toggle reads "+" when closed and "−" when open (admin.js sets the character). Do not also rotate it:
   a minus turned 45 degrees reads as a slash. */
.gd-faq-toggle {
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    min-width: 20px;
    text-align: center;
}

.gd-faq-answer {
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.gd-faq-answer.expanded {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.gd-faq-answer > div {
    padding: 20px;
}

.gd-faq-answer p {
    margin: 0 0 15px 0;
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.gd-faq-answer p:last-child {
    margin-bottom: 0;
}

.gd-faq-answer h4 {
    margin: 20px 0 10px 0;
    color: #23282d;
    font-weight: 600;
    font-size: 14px;
}

.gd-faq-answer ul,
.gd-faq-answer ol {
    margin: 10px 0 10px 20px;
    color: #555;
}

.gd-faq-answer li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.gd-faq-answer strong {
    color: #23282d;
    font-weight: 600;
}

.gd-faq-answer code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: #d63638;
}

.gd-faq-hidden {
    display: none;
}

/* ===================================================================
   Debug Section
   =================================================================== */

.gd-debug-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
}

.gd-debug-header {
    padding: 15px 20px;
    background: #23282d;
    color: #ffffff;
    border-bottom: 1px solid #1d2327;
    border-radius: 7px 7px 0 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    user-select: none;
    transition: all 0.2s ease;
}

.gd-debug-header:hover {
    background: #363d45;
    color: #ffffff;
}

.gd-debug-header .dashicons {
    transition: transform 0.2s ease;
}

.gd-debug-section.active .gd-debug-header .dashicons {
    transform: rotate(180deg);
}

.gd-debug-content {
    padding: 20px;
    display: none;
}

.gd-debug-section.active .gd-debug-content {
    display: block;
}

.gd-debug-output {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    user-select: all;
    max-height: 400px;
    overflow-y: auto;
    color: #333;
}

.gd-debug-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===================================================================
   Buttons
   =================================================================== */

/* USE WORDPRESS CORE BUTTONS, DON'T RESTYLE THEM:
 * WordPress 7.0 buttons are self-sufficient. The core `.button` / `.button-primary` /
 * `.button-secondary` classes (loaded via wp-includes/css/buttons.css under the admin body's
 * `.wp-core-ui` class) already provide the full geometry AND colours:
 *   - geometry: min-height 40px, padding 0 16px, border-radius 2px, font-weight 500, line-height 2.923
 *   - .button-primary : admin-accent FILLED button (themed by the user's admin colour scheme)
 *   - .button / .button-secondary : admin-accent OUTLINE button (transparent bg, accent border+text)
 *   - full :hover / :focus / :active / :disabled states
 * So we DO NOT restyle them: a custom shape fights WP 7.0's larger native buttons and looks wrong.
 * RULES:
 *   - Markup: always use both `button` AND a type class (e.g. `button button-primary`).
 *   - NEVER add geometry or colour rules for `.button` / `.button-primary` / `.button-secondary`.
 *   - The ONLY custom button below is `.gd-button-warning` — WP has no native destructive button,
 *     so it only recolours red on top of the core geometry it inherits from the `.button` class.
 * Which one: the main form action (Save, Submit) is .button-primary; a destructive action (Delete,
 * Clear) is .gd-button-warning; everything else is .button-secondary.
 */

/* Warning/Destructive Button (.button .gd-button-warning)
 * Purpose: Destructive actions that cannot be undone (Delete, Clear, Remove)
 * Background: #dc3232 (WordPress red) - warning color
 * Usage: Any action that deletes data or clears cache
 * HTML: <button class="button gd-button-warning">Delete All Data</button>
 * Should be paired with confirmation dialog (onclick="return confirm(...)") */
#gd-admin .gd-button-warning {
    background: #dc3232;
    border-color: #dc3232;
    color: #fff;
}

#gd-admin .gd-button-warning:hover {
    background: #c12a2a;
    border-color: #c12a2a;
    color: #fff;
}

/* Button Groups (.gd-button-group)
 * Purpose: Horizontal layout for multiple buttons with consistent spacing
 * Gap: 10px between buttons (replaces inline style="margin-left: 10px;")
 * Usage: Wrap multiple buttons that appear together
 * HTML: <div class="gd-button-group"><button>...</button><button>...</button></div> */
.gd-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

/* Button Container for Spinner and Messages */
.gd-button-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.gd-button-container .button {
    display: flex;
    align-items: center;
}

.gd-button-text {
    display: inline-block;
}

.gd-button-spinner {
    display: none;
    margin-left: 2px;
}

.gd-button-message {
    display: none;
    margin-left: 10px;
    color: #46b450;
    font-size: 13px;
}

.gd-button-message.gd-error {
    color: #dc3232;
}

/* Spinner Animation */
@keyframes gd-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===================================================================
   Footer
   =================================================================== */

.gd-footer {
    text-align: center;
    padding: 20px 0 0 0;
    color: #666;
    font-size: 13px;
    border-top: 1px solid #dcdcde;
    margin-top: 40px;
}

.gd-footer a {
    color: var(--wp-admin-theme-color, #3858e9);
    text-decoration: none;
}

.gd-footer a:hover {
    text-decoration: underline;
}

/* ===================================================================
   Conditional Field Visibility
   =================================================================== */

.gd-hidden {
    display: none !important;
}

/* Smooth transition for conditional fields (optional) */
.gd-settings-wrap .form-table tr {
    transition: opacity 0.2s ease-in-out;
}

/* ===================================================================
   Responsive Design
   =================================================================== */

@media (max-width: 782px) {
    .gd-settings-wrap {
        padding: 15px;
    }

    .gd-nav-tab {
        display: block;
        margin: 0 0 -1px 0;
        border-radius: 0;
    }

    .gd-status-grid {
        grid-template-columns: 1fr;
    }

    .gd-info-grid {
        grid-template-columns: 1fr;
    }

    .gd-settings-wrap input[type="text"],
    .gd-settings-wrap select {
        min-width: 100%;
        max-width: 100%;
    }

    .gd-settings-wrap .form-table th,
    .gd-settings-wrap .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    /* Label and field stack here, so the label starts the row and the help icon follows its label on the
       same line instead of sitting at the far edge, where its tooltip opened off-screen. vertical-align: top
       and one line height keep the icon centred on the label line, as on wide screens. */
    .gd-settings-wrap .form-table th,
    .gd-settings-wrap .form-table tr:has(> td > input[type="text"], > td > input[type="number"], > td > input[type="email"], > td > input[type="url"], > td > input[type="password"], > td > select, > td > .gd-switch) > th {
        --gd-label-top: 10px;
    }

    .gd-settings-wrap .form-table th .gd-tooltip-wrapper {
        position: relative;
        top: auto;
        right: auto;
        display: inline-flex;
        vertical-align: top;
        margin-left: 6px;
    }

    .gd-tooltip-text {
        left: 0;
        right: auto;
        width: 250px;
    }
}

/* Phones: the tooltip opens below the label, across the whole cell, so it always fits the screen. */
@media (max-width: 600px) {
    .gd-settings-wrap .form-table th .gd-tooltip-wrapper {
        position: static;
    }

    .gd-settings-wrap .form-table th .gd-tooltip-text {
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
    }

    .gd-settings-wrap .form-table th .gd-tooltip-text::after {
        display: none;
    }
}

/* ===================================================================
   Utility Classes
   =================================================================== */

/* Note: .gd-hidden is defined in "Conditional Field Visibility" section (line ~867) */

.gd-text-center {
    text-align: center;
}

.gd-text-success {
    color: #00a32a; /* Gorilla DevOps Success Green */
}

.gd-text-error {
    color: #dc3232;
}

.gd-text-warning {
    color: #f56e28;
}

.gd-text-info {
    color: var(--wp-admin-theme-color, #3858e9);
}

/* Deep link highlight animation for scrolling to anchors */
.gd-highlight {
    animation: gd-highlight-pulse 2s ease-out;
}

@keyframes gd-highlight-pulse {
    0% { background-color: rgba(var(--wp-admin-theme-color--rgb, 56, 88, 233), 0.3); }
    100% { background-color: transparent; }
}

/* ===================================================================
   Spacing Utility Classes
   Use these instead of inline styles.
   =================================================================== */

/* Margin Top */
.gd-mt-0 { margin-top: 0; }
.gd-mt-10 { margin-top: 10px; }
.gd-mt-15 { margin-top: 15px; }
.gd-mt-20 { margin-top: 20px; }
.gd-mt-30 { margin-top: 30px; }

/* Margin Bottom */
.gd-mb-0 { margin-bottom: 0; }
.gd-mb-10 { margin-bottom: 10px; }
.gd-mb-15 { margin-bottom: 15px; }
.gd-mb-20 { margin-bottom: 20px; }
.gd-mb-30 { margin-bottom: 30px; }

/* Margin Left */
.gd-ml-10 { margin-left: 10px; }
.gd-ml-15 { margin-left: 15px; }
.gd-ml-20 { margin-left: 20px; }

/* Margin Right */
.gd-mr-10 { margin-right: 10px; }
.gd-mr-15 { margin-right: 15px; }
.gd-mr-20 { margin-right: 20px; }

/* Compound Margins */
.gd-my-20 { margin-top: 20px; margin-bottom: 20px; }
.gd-my-30 { margin-top: 30px; margin-bottom: 30px; }

/* Code Block Styling (use instead of inline styles on pre/code) */
.gd-code-block {
    background: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 13px;
}

.gd-code-block-dark {
    background: #23282d;
    color: #f0f0f1;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    max-height: 800px;
    overflow-y: auto;
}

/* Status Colors (use instead of inline color styles) */
.gd-text-success { color: #00a32a; }
.gd-text-error { color: #dc3232; }
.gd-text-warning { color: #f56e28; }
.gd-text-muted { color: #666; }
.gd-text-info { color: var(--wp-admin-theme-color, #3858e9); }

/* Display Utilities */
.gd-block { display: block; }
.gd-inline { display: inline; }
.gd-inline-block { display: inline-block; }

/* License Status (vertical alignment with dashicons) */
.gd-license-status {
    line-height: 30px;
}
.gd-license-status .dashicons {
    line-height: 30px;
}

.gd-copy-message {
    color: #46b450;
    font-size: 13px;
    font-weight: 600;
}

/* ===================================================================
   Two-Column Performance Monitor Styles
   =================================================================== */

/* Two Column Layout */
.gd-performance-columns {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.gd-performance-left,
.gd-performance-right {
    flex: 1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.gd-performance-left h3,
.gd-performance-right h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
}

/* Memory Bar (Narrower for column) */
.gd-column-memory {
    margin-bottom: 20px;
}

.gd-column-memory label {
    display: block;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 8px;
    font-size: 13px;
}

.gd-column-memory-bar {
    width: 100%;
    height: 16px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.gd-memory-fill {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.gd-memory-details {
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

.gd-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.gd-status-excellent {
    color: #4caf50;
    background: #e8f5e9;
}

.gd-status-good {
    color: #2196F3;
    background: #e3f2fd;
}

.gd-status-warning {
    color: #ff9800;
    background: #fff3e0;
}

.gd-status-critical {
    color: #f44336;
    background: #ffebee;
}

/* Metrics List */
.gd-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gd-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.gd-metric-item:last-child {
    border-bottom: none;
}

.gd-metric-item strong {
    color: #1e1e1e;
    font-weight: 600;
}

.gd-metric-item span {
    color: #646970;
}

/* Cache Info */
.gd-cache-info {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.gd-cache-stat {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
}

.gd-cache-stat strong {
    color: #1e1e1e;
    font-weight: 600;
}

/* Cache Actions */
.gd-cache-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gd-cache-actions .button {
    flex: 1;
}

/* Settings Form */
.gd-settings-form {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.gd-compact-table {
    margin: 0;
}

.gd-compact-table th {
    padding: 10px 10px 10px 0;
    font-size: 13px;
}

.gd-compact-table td {
    padding: 10px;
}

/* Inline Notice */
.gd-notice-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-top: 20px;
    border-radius: 6px;
    font-size: 13px;
}

.gd-notice-inline.gd-notice-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.gd-notice-inline .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #ff9800;
}

/* Responsive Design */
@media (max-width: 960px) {
    .gd-performance-columns {
        flex-direction: column;
        gap: 20px;
    }

    .gd-performance-left,
    .gd-performance-right {
        width: 100%;
    }
}

@media (max-width: 782px) {
    .gd-cache-actions {
        flex-direction: column;
    }

    .gd-cache-actions .button {
        width: 100%;
    }

    .gd-compact-table th,
    .gd-compact-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .gd-title-wrapper {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ===================================================================
   Ultra-Compact Performance Design
   =================================================================== */

/* Compact Section Container */
.gd-compact-section {
    padding: 20px !important;
}

/* Plugin Header with Performance Badges */
.gd-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #dcdcde;
    margin-bottom: 16px;
}

.gd-info-compact {
    flex: 1;
}

.gd-title-compact {
    font-size: 13px;
    font-weight: 500;
    color: #3c434a;
    margin-bottom: 4px;
}

.gd-meta-compact {
    font-size: 12px;
    color: #646970;
}

/* Performance Badges */
.gd-perf-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.gd-perf-badge {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    line-height: 1.3;
    flex: 0 0 auto;
    min-width: 130px;
    text-align: center;
}

.gd-perf-label {
    color: #646970;
    font-weight: 400;
}

.gd-perf-value {
    color: #1d2327;
    font-weight: 600;
    margin-left: 4px;
}

/* Badge Status Colors */
.gd-badge-excellent {
    background: #edfaef;
    border-color: #68de7c;
}

.gd-badge-excellent .gd-perf-value {
    color: #00a32a;
}

.gd-badge-good {
    background: #e3f2fd;
    border-color: #90caf9;
}

.gd-badge-good .gd-perf-value {
    color: #2196F3;
}

.gd-badge-warning {
    background: #fff3e0;
    border-color: #ffcc80;
}

.gd-badge-warning .gd-perf-value {
    color: #ff9800;
}

.gd-badge-critical {
    background: #ffebee;
    border-color: #ef9a9a;
}

.gd-badge-critical .gd-perf-value {
    color: #f44336;
}

/* Cache Status Compact */
.gd-cache-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    font-size: 12px;
    margin-bottom: 16px;
}

.gd-cache-info-compact {
    display: flex;
    gap: 16px;
    color: #646970;
    flex-wrap: wrap;
}

.gd-cache-info-compact span {
    display: flex;
    gap: 4px;
}

.gd-cache-info-compact strong {
    color: #1d2327;
    font-weight: 600;
}

.gd-cache-actions-compact {
    display: flex;
    gap: 8px;
}

/* ===================================================================
   Compact Button System (.gd-btn)
   =================================================================== */

/* NOTE:
 * These compact buttons (.gd-btn) are ONLY for Settings tab performance sections
 * Usage: 10% of cases (compact cache actions, refresh stats buttons)
 * DO NOT use .gd-btn-secondary in General tab, About tab, or forms
 * For 90% of cases, use .button .button-secondary (blue) instead
 *
 * Pattern: Compact button system for dense layouts
 * Size: Smaller than WordPress buttons (12px font vs 13px)
 * Color: Gray/neutral (NOT Gorilla DevOps blue)
 */

/* Base Compact Button (.gd-btn)
 * All .gd-btn variants inherit these base styles
 * Smaller, more compact than WordPress .button class
 * Used in ultra-compact layouts only */
.gd-btn {
    display: inline-block;
    padding: 5px 12px;
    background: white;
    border: 1px solid var(--wp-admin-theme-color, #3858e9);
    color: var(--wp-admin-theme-color, #3858e9);
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    line-height: 1.4;
}

.gd-btn:hover {
    background: var(--wp-admin-theme-color, #3858e9);
    color: white;
}

/* Compact Primary (.gd-btn-primary)
 * Usage: Rare - only for primary actions in compact sections
 * Color: var(--wp-admin-theme-color, #3858e9) - inherits WP admin color scheme
 * HTML: <button class="gd-btn gd-btn-primary">Save</button> */
.gd-btn-primary {
    background: var(--wp-admin-theme-color, #3858e9);
    color: white;
    padding: 6px 16px;
}

.gd-btn-primary:hover {
    background: var(--wp-admin-theme-color-darker-20, #183ad6);
    border-color: var(--wp-admin-theme-color-darker-20, #183ad6);
}

/* Compact Secondary (.gd-btn-secondary)
 * Common mistake: using this instead of .button .button-secondary
 * Purpose: ONLY for Settings tab performance badges section (10% usage)
 * Color: Gray #c3c4c7 (NOT the theme accent blue - that's .button .button-secondary)
 * Usage: Refresh Stats, compact cache action buttons
 * HTML: <button class="gd-btn gd-btn-secondary">Refresh Stats</button>
 * WRONG: Using in General tab, About tab, documentation links */
.gd-btn-secondary {
    border-color: #c3c4c7;
    color: #50575e;
}

.gd-btn-secondary:hover {
    border-color: #8c8f94;
    background: #f6f7f7;
    color: #1d2327;
}

/* Compact Danger (.gd-btn-danger)
 * Purpose: Destructive actions in compact sections
 * Color: Red #d63638 (WordPress danger color)
 * Usage: Purge Cache, Clear Data buttons in compact layout
 * HTML: <button class="gd-btn gd-btn-danger">Purge Cache</button> */
.gd-btn-danger {
    border-color: #d63638;
    color: #d63638;
}

.gd-btn-danger:hover {
    background: #d63638;
    color: white;
    border-color: #d63638;
}

/* Compact Settings Form */
.gd-settings-compact {
    padding-top: 0;
}

/* Save Section */
.gd-save-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #dcdcde;
    text-align: right;
}

/* Responsive Design for Ultra-Compact */
@media (max-width: 782px) {
    .gd-header-compact {
        flex-direction: column;
        gap: 12px;
    }

    .gd-perf-badges {
        width: 100%;
    }

    .gd-cache-compact {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .gd-cache-actions-compact {
        width: 100%;
        flex-direction: column;
    }

    .gd-cache-actions-compact .gd-btn {
        width: 100%;
    }

    .gd-settings-table th,
    .gd-settings-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
        text-align: left;
    }
}

/* ===================================================================
   Debug Mode Controls
   =================================================================== */

.gd-debug-option {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.gd-debug-option.gd-hidden {
    display: none;
}

.gd-debug-lgd-viewer {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.gd-debug-lgd-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.gd-debug-lgd-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.gd-debug-lgd-info code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.gd-debug-lgd-display {
    animation: gd-fadeIn 0.3s ease;
}

.gd-debug-lgd-display .gd-debug-output {
    max-height: 500px;
}

/* Admin notice for active debug mode */
.gd-debug-notice {
    border-left-color: #f0ad4e !important;
}

.gd-debug-notice .dashicons-warning {
    color: #f0ad4e;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 5px;
}

.gd-disable-debug-now {
    text-decoration: none;
    font-weight: 600;
}

.gd-disable-debug-now:hover {
    text-decoration: underline;
}

/* ===================================================================
   Template Viewer Tab (Developer-only feature)
   Only visible when GORILLA_CACHE_SHOW_TEMPLATE is true
   =================================================================== */

/* Template viewer content area */
#gd-tab-template pre {
    max-height: 800px;
    overflow-y: auto;
}

#gd-tab-template pre code {
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

/* Smooth scroll anchor targets */
#gd-tab-template a[id^="component-"] {
    display: block;
    position: relative;
    top: -80px;
    visibility: hidden;
}

/* ===================================================================
   Responsive - Debug Mode Controls
   =================================================================== */

@media (max-width: 782px) {
    .gd-debug-lgd-info {
        flex-direction: column;
        gap: 10px;
    }

    .gd-debug-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .gd-debug-actions .button {
        width: 100%;
    }
}

/* ===================================================================
   Component #19: Text Generation Box
   =================================================================== */

/* Character count display with progress bar */
.gd-char-count {
    margin: 20px 0 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-char-label {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.gd-progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #dcdcde;
}

.gd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wp-admin-theme-color, #3858e9) 0%, var(--wp-admin-theme-color-darker-20, #183ad6) 100%);
    transition: width 0.3s ease;
}

.gd-char-stats {
    font-size: 13px;
    color: #50575e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gd-generated-content {
    margin: 0 0 15px 0;
}

.gd-generated-content textarea {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
}

/* ===================================================================
   Component #20: Stats Badges
   =================================================================== */

.gd-stats-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    padding: 8px 0;
}

.gd-stats-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.gd-stats-label {
    font-size: 13px;
    color: #646970;
    font-weight: 400;
}

.gd-stats-value {
    font-size: 13px;
    color: #3c434a;
    font-weight: 500;
}

/* ===================================================================
   Component #21: Compact Toggle Layout
   =================================================================== */

.gd-compact-toggles {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin: 20px 0;
}

.gd-compact-toggle-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f1;
}

.gd-compact-toggle-item:last-child {
    border-bottom: none;
}

.gd-toggle-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.gd-toggle-title {
    font-size: 13px;
    font-weight: 500;
    color: #3c434a;
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
}

.gd-toggle-description {
    margin: 0 0 0 44px; /* Align with title (switch width + gap) */
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

/* Mobile responsiveness for compact toggles */
@media screen and (max-width: 782px) {
    .gd-compact-toggle-item {
        padding: 10px 14px;
    }

    .gd-toggle-header {
        gap: 8px;
    }

    .gd-toggle-description {
        margin-left: 40px;
        font-size: 11px;
    }
}

/* ===================================================================
   Component #22: Card Grid (Site Health Style)
   Dashboard cards with dark headers and WP native table styling
   =================================================================== */

.gd-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media screen and (max-width: 782px) {
    .gd-card-grid {
        grid-template-columns: 1fr;
    }
}

.gd-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    overflow: hidden;
}

/* Card header - higher specificity to override WP admin h3 defaults */
.gd-card > .gd-card-header,
h3.gd-card-header {
    background: #23282d;
    color: #fff;
    padding: 8px 12px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: 1px solid #c3c4c7;
}

/* Remove table borders inside cards - match Site Health > Info */
.gd-card .widefat {
    border: 0;
    margin: 0;
    border-radius: 0;
}

.gd-card .widefat th,
.gd-card .widefat td {
    padding: 4px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.gd-card .widefat th {
    width: 40%;
    font-weight: 400;
    color: #646970;
}

.gd-card .widefat td {
    color: #646970;
}
/* ==========================================================================
   Optional Log tab — detail rows (includes/class-gorillacache-log.php + views/log.php)
   ========================================================================== */
.gd-log-details > td {
    background: #f6f7f7;
    padding: 16px;
}
.gd-log-detail-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.gd-log-detail-list li {
    margin: 0 0 6px;
    word-break: break-all;
}
.gd-log-detail-list li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Checklist (status at a glance)
   One row per fact: an icon that says good, warning or neutral, a short bold line, and one plain sentence under
   it. Easier to read than a grid of number cards, and a warning stands out without making the page longer.
   Icons are WordPress's own Dashicons (loaded in every admin screen):
     <span class="gd-checklist-icon gd-checklist-good dashicons dashicons-yes-alt" aria-hidden="true"></span>
   The header row puts the section heading and its buttons on one line; on narrow screens the buttons wrap below.
   ========================================================================== */
.gd-checklist-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.gd-section .gd-checklist-header h2 {
    margin: 0;
    padding: 0;
    border-bottom: 0;
}

.gd-checklist-header .gd-button-container {
    margin: 0;
    flex-wrap: wrap; /* The Caching switch and the buttons wrap on a phone instead of running off it. */
}

.gd-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gd-checklist-item {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f1;
}

.gd-checklist-item:last-child {
    border-bottom: 0;
}

.gd-checklist-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
}

.gd-checklist-good {
    color: #008a20;
}

.gd-checklist-warning {
    color: #996800;
}

.gd-checklist-neutral {
    color: #646970;
}

.gd-checklist-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gd-checklist-title {
    font-weight: 600;
    color: #1e1e1e;
}

.gd-checklist-text {
    color: #50575e;
}

/* The help icon is a link to the guide: it keeps its look on hover, and shows where the keyboard is. */
a.gd-tooltip,
a.gd-tooltip:hover,
a.gd-tooltip:active {
    color: #646970;
    text-decoration: none;
}

/* The ring shows for keyboard focus only (focus-visible): a mouse click leaves no ring around the ?. WordPress draws
   one on every focused link, so it is taken off here for the mouse case. */
a.gd-tooltip:focus {
    color: #646970;
    box-shadow: none;
    outline: none;
}

a.gd-tooltip:focus-visible {
    box-shadow: 0 0 0 2px #2271b1;
    outline: 2px solid transparent;
}

/* The Status tab's lean layout: the status line on its own, then two cards side by side. */
/* The two Status cards' title rows are the same height, with or without a button (40px on WordPress 7), so their
   lines meet. */
.gd-card-grid .gd-checklist-header {
    min-height: 58px;
    box-sizing: border-box;
}

.gd-checklist-header-alone {
    padding-bottom: 0;
    border-bottom: 0;
}

/* The sign sits level with the heading's line, not in the middle of heading and sentence: the heading has a fixed
   line height and the 28px icon is centred on it. */
.gd-checklist-verdict {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gd-section .gd-checklist-verdict h2 {
    margin: 0;
    padding: 0;
    border-bottom: 0;
    line-height: 32px;
}

.gd-checklist-verdict > .gd-checklist-icon {
    margin-top: 2px;
}

.gd-checklist-verdict .description {
    margin: 2px 0 0;
}

.gd-checklist-verdict .gd-checklist-icon {
    width: 28px;
    height: 28px;
    font-size: 28px;
}

.gd-card-grid > .gd-section {
    margin: 0;
}

.gd-checklist-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.gd-checklist-table th,
.gd-checklist-table td {
    padding: 8px 0;
    border-top: 1px solid #f0f0f1;
    vertical-align: top;
}

.gd-checklist-table tr:first-child th,
.gd-checklist-table tr:first-child td {
    border-top: 0;
}

.gd-checklist-table th {
    text-align: left;
    font-weight: 400;
    color: #50575e;
    padding-right: 16px;
    white-space: nowrap;
}

.gd-checklist-table td {
    text-align: right;
    font-weight: 600;
    color: #1e1e1e;
}

.gd-checklist-compact .gd-checklist-item {
    padding: 7px 0;
    border-bottom: 0;
}

.gd-checklist-line {
    color: #1e1e1e;
}

/* The maker's line at the bottom of the plugin's own screen: small and quiet. */
.gd-settings-wrap .gd-footer,
.gd-footer.gd-footer-quiet {
    text-align: left;
    border-top: 0;
    margin-top: 24px;
    padding: 0;
    font-size: 12px;
    color: #646970;
}

.gd-footer.gd-footer-quiet a {
    color: #646970;
    text-decoration: underline;
}

.gd-section + .gd-card-grid {
    margin-top: 0;
}
