/*
Theme Name: SmartPick Child
Theme URI: https://smartpick.local/
Description: Child theme for SmartPick Theme. Add your custom styles and overrides here.
Author: SmartPick Team
Author URI: https://smartpick.local/
Template: smartpick-theme
Version: 1.0.7-20260602-0127
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smartpick-child
*/

/* ==========================================================================
   Sidebar Search Widget
   Strip .sidebar-widget card when it wraps .sp-search-widget
   ========================================================================== */

.sidebar-widget:has(.sp-search-widget) {
    padding: 0;
    border: none;
    background: transparent;
}

.sp-search-widget {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-search-widget:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

.sp-search-widget__icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-subtle);
    font-size: 15px;
    pointer-events: none;
}

.sp-search-widget input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 12px 8px 12px 38px;
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    color: var(--color-text);
    background: transparent;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.sp-search-widget input[type="search"]::placeholder {
    color: var(--color-text-subtle);
}

.sp-search-widget button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 4px;
    flex-shrink: 0;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s;
}

.sp-search-widget button[type="submit"]:hover {
    background: var(--color-primary-hover);
}









/* === Post polish: bullets + code (added 2026-06-02) === */

/* Body content fills its container — never any narrow text column */
.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content figure {
    max-width: none;
}

/* Body text — Inter sans-serif (already loaded by the theme).
   Designed by Rasmus Andersson specifically for screen UI/body legibility:
   tall x-height, screen-tuned glyphs, excellent at 0.9-1.05rem. */
.post-content p,
.post-content ul,
.post-content ol,
.post-content li,
.post-content blockquote {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
    font-size: 0.95rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 768px) {
    .post-content p,
    .post-content ul,
    .post-content ol,
    .post-content li,
    .post-content blockquote {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* Bullet & numbered lists
   The parent theme injects custom ::before dots that don't line up with text.
   Disable them so the browser's native ::marker (which auto-aligns) takes over. */
.post-content ul:not([class]) li::before,
.post-content ol:not([class]) li::before {
    content: none !important;
}

.post-content ul:not([class]),
.post-content ol:not([class]) {
    padding-left: 1.5em;
    margin: 1.25em 0;
    line-height: 1.7;
    list-style-position: outside;
}
.post-content ul:not([class]) { list-style-type: disc; }
.post-content ol:not([class]) { list-style-type: decimal; }

.post-content ul:not([class]) li,
.post-content ol:not([class]) li {
    margin-bottom: 0.55em;
    padding-left: 0;
}
.post-content ul:not([class]) li::marker {
    color: var(--color-primary, #e74c3c);
}
.post-content ol:not([class]) li::marker {
    color: var(--color-primary, #e74c3c);
    font-weight: 700;
}
.post-content ul:not([class]) > li > p,
.post-content ol:not([class]) > li > p {
    margin: 0 0 0.35em 0;
}
.post-content ul:not([class]) ul,
.post-content ol:not([class]) ol,
.post-content ul:not([class]) ol,
.post-content ol:not([class]) ul {
    margin: 0.4em 0;
    padding-left: 1.4em;
}

/* Inline <code> */
.post-content :not(pre) > code {
    background: #f1f5f9;
    color: #be185d;
    padding: 0.15em 0.42em;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Monaco, "Courier New", monospace;
    font-size: 0.9em;
    word-wrap: break-word;
}

/* Code blocks */
.post-content pre {
    background: #0a0a0a;
    color: #ffffff;
    padding: 1.5em 1.5em 1.25em;
    border-left: 4px solid var(--color-primary, #3b82f6);
    border-radius: 8px;
    overflow-x: auto;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Monaco, "Courier New", monospace;
    font-size: 0.88em;
    line-height: 1.7;
    margin: 1.75em 0;
    position: relative;
    max-width: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    tab-size: 4;
}
.post-content pre code {
    background: transparent;
    padding: 0;
    color: #ffffff;
    font-family: inherit;
    font-size: inherit;
    border: 0;
    border-radius: 0;
    white-space: pre;
    word-wrap: normal;
}
.post-content pre code::selection,
.post-content pre::selection {
    background: rgba(255, 255, 255, 0.22);
}
.post-content pre::-webkit-scrollbar { height: 8px; }
.post-content pre::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
}
.post-content pre::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 4px;
}
.post-content pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.32);
}

/* Copy button — top right, branded color */
.post-content pre .sp-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-primary, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 0.4em 1em;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.72em;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.15s, transform 0.15s, background 0.15s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.post-content pre .sp-copy-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.post-content pre .sp-copy-btn.copied {
    background: #10b981;
}

/* Mobile */
@media (max-width: 768px) {
    .post-content pre {
        font-size: 0.82em;
        padding: 1.1em 1em 0.95em;
        border-radius: 6px;
    }
    .post-content pre .sp-copy-btn {
        font-size: 0.68em;
        padding: 0.28em 0.7em;
    }
    .post-content ul,
    .post-content ol {
        padding-left: 1.25em;
    }
}
/* === /post polish === */
