/* =====================================================================
   OK TOOLS STYLES
   Shared styles for the two free tools:
   - templates/page-camera-assistant.php (Camera Manual Assistant)
   - templates/page-gear-wizard.php (Gear Setup Wizard)
   Loaded conditionally via ok_enqueue_tools_assets() in functions.php,
   on the two tool page templates only.

   Uses the shared brand tokens for light and dark mode.
   ===================================================================== */

/* --- Shared card base -------------------------------------------------- */

.ok-tool-card {
    background: var(--ok-card-bg);
    border: 1px solid var(--ok-card-border);
    border-radius: 12px;
    padding: 24px;
    font-family: 'Inter', sans-serif;
    color: var(--ok-text);
}

.ok-tool-intro {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--ok-text);
    opacity: 0.85;
}

.ok-tool-footnote {
    max-width: 760px;
    margin: 3rem auto 0;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ok-text-muted) !important;
    opacity: 1;
}

.ok-tool-noscript {
    max-width: 760px;
    margin: 0 auto 2rem;
    padding: 20px 24px;
    border: 1px solid var(--ok-accent);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    color: var(--ok-text);
}

.ok-tool-noscript a {
    color: var(--ok-link);
    text-decoration: underline;
}

/* --- Camera picker ------------------------------------------------------ */

.ok-ca-model-control { max-width: 760px; margin: 0 auto 2rem; }
.ok-ca-model-control select { appearance: auto; }
#okCaModel, #okCaSearch { height: auto; min-height: 50px; line-height: 1.5; padding: 12px 20px; }
#okCaModel {
    /* WebKit's native menu control ignores min-height; keep a full touch target. */
    height: 54px;
    padding-right: 36px;
}
#okCaModelHelp, #okCaResults .ok-ca-source-date {
    /* The legacy section paragraph rules are important; keep UI notes compact. */
    font: 400 0.875rem/1.6 var(--ok-sans) !important;
    color: var(--ok-text-muted) !important;
    margin-top: 12px;
}

.ok-ca-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 0 auto 2.5rem;
}

.ok-ca-camera {
    background: var(--ok-card-bg);
    border: 1px solid var(--ok-card-border);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    color: var(--ok-text);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ok-ca-camera:hover,
.ok-ca-camera:focus-visible {
    border-color: var(--ok-link);
    transform: translateY(-3px);
}

.ok-ca-camera.is-active {
    border-color: var(--ok-link);
    box-shadow: 0 0 0 2px var(--ok-accent);
}

.ok-ca-camera-name {
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 0 6px;
}

.ok-ca-camera-model {
    font-weight: 300;
    font-size: 0.82rem;
    opacity: 1;
    letter-spacing: 0.06em;
}

#okCaPicker .ok-ca-camera-model {
    color: var(--ok-text-muted) !important;
}

/* --- Search box + chips -------------------------------------------------- */

.ok-ca-search-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.ok-ca-search-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ok-text);
    opacity: 0.7;
    margin-bottom: 8px;
}

.ok-ca-search {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    padding: 15px 18px;
    border: 1px solid var(--ok-input-border);
    background: var(--ok-input-bg);
    color: var(--ok-text);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease;
}

.ok-ca-search::placeholder {
    color: var(--ok-text-muted);
}

.ok-ca-search:focus {
    border-color: var(--ok-link);
}

#okCaSearch:focus-visible,
#okCaModel:focus-visible {
    /* Astra resets focused input outlines; keep the tool's keyboard ring. */
    outline: 2px solid var(--ok-text) !important;
    outline-offset: 3px;
}

.ok-ca-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ok-ca-chip {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--ok-input-border);
    background: transparent;
    color: var(--ok-text);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

/* Override Astra's blue button hover, focus and pressed surfaces. */
button.ok-ca-chip:hover,
button.ok-ca-chip:focus,
button.ok-ca-chip:active {
    background: transparent;
    border-color: var(--ok-link);
    color: var(--ok-link);
}

/* --- Result cards -------------------------------------------------------- */

.ok-ca-results {
    max-width: 760px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ok-ca-result {
    background: var(--ok-card-bg);
    border: 1px solid var(--ok-card-border);
    border-radius: 12px;
    padding: 26px;
    font-family: 'Inter', sans-serif;
    color: var(--ok-text);
}

.ok-ca-result h3 {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0 12px;
    color: var(--ok-text);
}

.ok-ca-result-answer {
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 16px;
    opacity: 0.9;
}

.ok-ca-menu-path {
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 10px 14px;
    background: var(--ok-card-bg);
    border: 1px solid var(--ok-card-border);
    border-radius: 8px;
    margin: 0 0 14px;
}

.ok-ca-menu-path strong {
    font-weight: 600;
    color: var(--ok-link);
}

.ok-ca-result-meta {
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0 0 10px;
    opacity: 0.85;
}

.ok-ca-result-meta strong {
    font-weight: 600;
    opacity: 1;
}

.ok-ca-result-link {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ok-link);
    text-decoration: underline;
}

.ok-ca-related {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--ok-link);
    border-radius: 8px;
    background: var(--ok-card-bg);
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.6;
}

.ok-ca-related a {
    font-weight: 600;
    color: var(--ok-link);
    text-decoration: underline;
}

.ok-ca-empty {
    background: var(--ok-card-bg);
    border: 1px dashed var(--ok-text-muted);
    border-radius: 12px;
    padding: 24px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--ok-text);
    text-align: center;
}

.ok-ca-empty a {
    color: var(--ok-link);
    text-decoration: underline;
}

/* --- Wizard form ---------------------------------------------------------- */

.ok-gw-form {
    max-width: 860px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: var(--ok-text);
}

.ok-gw-question {
    margin-bottom: 2.5rem;
}

.ok-gw-question-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 0 4px;
    color: var(--ok-text);
}

.ok-gw-question-hint {
    font-weight: 300;
    font-size: 0.88rem;
    color: var(--ok-text-muted);
    opacity: 1;
    margin: 0 0 14px;
}

.ok-gw-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.ok-gw-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.ok-gw-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ok-gw-option-card {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--ok-input-border);
    border-radius: 10px;
    background: var(--ok-card-bg);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ok-gw-option:hover .ok-gw-option-card {
    border-color: var(--ok-link);
}

.ok-gw-option input:focus-visible + .ok-gw-option-card {
    outline: 2px solid var(--ok-text);
    outline-offset: 2px;
}

html[data-theme] .ok-gw-option input:checked + .ok-gw-option-card {
    border-color: var(--ok-link);
    background: var(--ok-accent);
    /* Selected labels must override legacy global span colors. */
    color: var(--ok-accent-ink) !important;
    font-weight: 600;
}

.ok-gw-submit-row {
    text-align: center;
    margin-top: 1rem;
}

/* --- Wizard results -------------------------------------------------------- */

.ok-gw-results {
    max-width: 980px;
    margin: 3rem auto 0;
    font-family: 'Inter', sans-serif;
    color: var(--ok-text);
}

.ok-gw-kit-title {
    font-weight: 700;
    font-size: 1.7rem;
    margin: 0 0 18px;
    text-align: center;
    color: var(--ok-text);
}

.ok-gw-disclosure-top {
    max-width: 760px;
    margin: 0 auto 2rem;
    padding: 14px 18px;
    border: 1px solid var(--ok-input-border);
    border-left: 4px solid var(--ok-accent);
    border-radius: 8px;
    background: var(--ok-card-bg);
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.65;
}

.ok-gw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
    margin-bottom: 2rem;
}

.ok-gw-item {
    background: var(--ok-card-bg);
    border: 1px solid var(--ok-card-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.ok-gw-item-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    margin-bottom: 13px;
    overflow: hidden;
    background: var(--ok-surface-alt);
}

.ok-gw-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ok-gw-item h3 {
    font-weight: 700;
    font-size: 1.02rem;
    margin: 0 0 8px;
    color: var(--ok-text);
}

.ok-gw-item-why {
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.55;
    opacity: 0.85;
    margin: 0 0 16px;
}

.ok-gw-item .ok-gw-price-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 11px 16px;
    border-radius: 6px;
    background: var(--ok-accent);
    color: var(--ok-accent-ink);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.ok-gw-item .ok-gw-price-btn:hover,
.ok-gw-item .ok-gw-price-btn:focus-visible {
    background: var(--ok-accent-hover);
    color: var(--ok-accent-ink);
}

.ok-gw-advice {
    border: 1px dashed var(--ok-text-muted);
    border-radius: 12px;
    padding: 20px;
    background: var(--ok-card-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ok-gw-advice h3 {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--ok-link);
}

.ok-gw-advice p {
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0;
}

.ok-gw-advice a,
.ok-gw-advice a:hover,
.ok-gw-advice a:focus {
    /* Override the parent theme's blue focused-link color. */
    color: var(--ok-link);
    text-decoration: underline;
}

.ok-gw-skip {
    max-width: 760px;
    margin: 0 auto 2rem;
    padding: 14px 18px;
    border: 1px dashed var(--ok-text-muted);
    border-radius: 8px;
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.65;
    text-align: center;
    opacity: 0.85;
}

.ok-gw-skip strong {
    font-weight: 600;
}

.ok-gw-share-row {
    text-align: center;
    margin-bottom: 2.5rem;
}

.ok-gw-copy-status {
    display: block;
    margin-top: 10px;
    font-weight: 300;
    font-size: 0.85rem;
    opacity: 0.7;
    min-height: 1.2em;
}

.ok-gw-disclosure-bottom {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.65;
    text-align: center;
    /* Muted via color, not opacity: parent opacity would also dim the
       accessible accent color of the disclosure link inside. */
    color: var(--ok-text-muted);
}

html[data-theme='light'] .ok-gw-disclosure-bottom {
    color: var(--ok-text-muted);
}

.ok-gw-disclosure-bottom a {
    color: var(--ok-link);
    text-decoration: underline;
}

.ok-gw-email {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.ok-gw-email p {
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.65;
    /* Parent opacity also dims the hosted-form link below the minimum contrast. */
    opacity: 1 !important;
}

.ok-gw-email a {
    color: var(--ok-link);
    text-decoration: underline;
}

/* Color tokens supply both light and dark mode; no legacy navy overrides. */

/* --- Mobile responsive -------------------------------------------------------- */

@media (max-width: 720px) {
    .ok-ca-picker {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .ok-gw-options {
        grid-template-columns: 1fr 1fr;
    }
    .ok-gw-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
    .ok-gw-kit-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 440px) {
    .ok-gw-options {
        grid-template-columns: 1fr;
    }
}

/* --- Theme-aware accents inside tool cards -------- */
html[data-theme='light'] .ok-ca-menu-path strong { color: var(--ok-link); }
html[data-theme='dark'] .ok-ca-menu-path strong { color: var(--ok-link); }
html[data-theme='light'] .ok-gw-advice h3 { color: var(--ok-link); }
html[data-theme='dark'] .ok-gw-advice h3 { color: var(--ok-link); }
