/*
 * CalculatorsForMe — DLE search and buttons only.
 * Load after the theme's main style.css.
 * Quick search: #searchsuggestions (DLE generated markup).
 * Buttons: .bbcodes, .btn, .dle-button.
 * Full search: add class="dle-search-results" to the results wrapper,
 * class="dle-search-item" to each result, and class="dle-search-title"
 * to its heading. These three classes are optional custom template hooks.
 * This file does not style every <button> or change calculator controls.
 */

/* Quick-search dropdown: position/top/left remain controlled by DLE. */
#searchsuggestions {
    box-sizing: border-box;
    z-index: 1000;
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 6px;
    overflow: hidden;
    border: 1px solid #dce5e8;
    border-radius: 12px;
    background: #ffffff;
    color: #132b3b;
    box-shadow: 0 12px 32px rgba(19, 43, 59, 0.14);
    font: 14px/1.5 Inter, Arial, sans-serif;
    text-align: left;
}

#searchsuggestions,
#searchsuggestions * {
    box-sizing: border-box;
}

#searchsuggestions a {
    display: block;
    padding: 12px 14px;
    border-radius: 7px;
    background: transparent;
    color: #132b3b;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#searchsuggestions a:hover,
#searchsuggestions a:focus-visible {
    background: #edf7f4;
    color: #08796e;
}

#searchsuggestions a:focus-visible {
    outline: 2px solid #08796e;
    outline-offset: -2px;
}

#searchsuggestions .searchheading {
    display: block;
    margin: 0 0 4px;
    color: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

#searchsuggestions .searchtext {
    display: block;
    margin: 0;
    color: #5d6e79;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#searchsuggestions .searchtitle {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid #dce5e8;
    color: #5d6e79;
    font-size: 14px;
    font-weight: 600;
}

#searchsuggestions .seperator {
    display: block;
    height: 1px;
    margin: 4px 8px;
    background: #dce5e8;
}

#searchsuggestions .notfound {
    display: block;
    padding: 16px 14px;
    color: #5d6e79;
    font-size: 14px;
}

/* Optional full-search result cards. */
.dle-search-results {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.dle-search-results .dle-search-item {
    box-sizing: border-box;
    min-width: 0;
    padding: 20px;
    border: 1px solid #dce5e8;
    border-radius: 10px;
    background: #ffffff;
    color: #132b3b;
    overflow-wrap: anywhere;
}

.dle-search-results .dle-search-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.4;
}

.dle-search-results .dle-search-title a {
    color: #08796e;
    text-decoration: none;
}

.dle-search-results .dle-search-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dle-search-results .dle-search-item p {
    margin: 0 0 12px;
    color: #5d6e79;
    font-size: 16px;
    line-height: 1.7;
}

/* Explicit button classes: no global button/input overrides. */
.bbcodes,
.btn,
.dle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    gap: 8px;
    min-height: 42px;
    max-width: 100%;
    padding: 10px 20px;
    border: 1px solid #08796e;
    border-radius: 8px;
    background: #08796e;
    color: #ffffff;
    box-shadow: none;
    font: 600 14px/1.4 Inter, Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: middle;
    cursor: pointer;
    appearance: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bbcodes:hover,
.btn:hover,
.dle-button:hover {
    border-color: #07675e;
    background: #07675e;
    color: #ffffff;
    text-decoration: none;
}

.bbcodes:focus-visible,
.btn:focus-visible,
.dle-button:focus-visible {
    outline: 3px solid #79c8b7;
    outline-offset: 3px;
}

.bbcodes:disabled,
.btn:disabled,
.dle-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn.btn-secondary,
.dle-button.dle-button-secondary {
    border-color: #dce5e8;
    background: #f4f7f9;
    color: #132b3b;
}

.btn.btn-secondary:hover,
.dle-button.dle-button-secondary:hover {
    border-color: #b9ccce;
    background: #eaf1f3;
}

@media (max-width: 600px) {
    #searchsuggestions a {
        padding: 11px 12px;
    }

    .dle-search-results .dle-search-item {
        padding: 16px;
    }

    .dle-search-results .dle-search-title {
        font-size: 18px;
    }

    .bbcodes,
    .btn,
    .dle-button {
        min-height: 44px;
        padding: 10px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #searchsuggestions a,
    .bbcodes,
    .btn,
    .dle-button {
        transition: none;
    }
}