/*
 * DoiHinhTFT.VN — Search box style
 * Đồng bộ ô tìm kiếm gốc của BlogHash với style dark/neon TFT.
 * Load sau CSS chính để ghi đè màu tím/hồng mặc định.
 */

/* Search form wrapper: bài viết, sidebar, footer, trang search/404 */
body #page .search-form:not(.dhtft-quick-search-widget .search-form),
body #page .widget_search .search-form,
body #page #main .search-form,
body #page #secondary .search-form,
body #page #colophon .search-form {
    max-width: 100% !important;
}

body #page .search-form:not(.dhtft-quick-search-widget .search-form) > div,
body #page .widget_search .search-form > div,
body #page #main .search-form > div,
body #page #secondary .search-form > div,
body #page #colophon .search-form > div {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

/* Input chính */
body #page .search-form:not(.dhtft-quick-search-widget .search-form) .search-field,
body #page .widget_search .search-field,
body #page #main .search-form .search-field,
body #page #secondary .search-form .search-field,
body #page #colophon .search-form .search-field,
body #page input.bloghash-input-search[type="search"] {
    width: 100% !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 15px 0 46px !important;
    margin: 0 !important;
    box-sizing: border-box !important;

    border: 1px solid rgba(47, 213, 255, .42) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(135deg, rgba(13, 30, 40, .94), rgba(7, 14, 24, .98)) !important;
    color: rgba(255, 255, 255, .94) !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 48px !important;
    letter-spacing: .01em !important;
    caret-color: #f6c453 !important;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .035),
        0 0 18px rgba(47, 213, 255, .10) !important;
    outline: none !important;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, color .22s ease !important;
}

/* Placeholder */
body #page .search-form .search-field::placeholder,
body #page input.bloghash-input-search[type="search"]::placeholder {
    color: rgba(230, 230, 230, .46) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}
body #page .search-form .search-field::-webkit-input-placeholder,
body #page input.bloghash-input-search[type="search"]::-webkit-input-placeholder {
    color: rgba(230, 230, 230, .46) !important;
    font-weight: 500 !important;
}
body #page .search-form .search-field::-moz-placeholder,
body #page input.bloghash-input-search[type="search"]::-moz-placeholder {
    color: rgba(230, 230, 230, .46) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

/* Focus/hover đồng bộ nút category */
body #page .search-form:not(.dhtft-quick-search-widget .search-form):hover .search-field,
body #page .widget_search .search-form:hover .search-field,
body #page #main .search-form:hover .search-field,
body #page #secondary .search-form:hover .search-field,
body #page #colophon .search-form:hover .search-field,
body #page .search-form:not(.dhtft-quick-search-widget .search-form):focus-within .search-field,
body #page .widget_search .search-form:focus-within .search-field,
body #page #main .search-form:focus-within .search-field,
body #page #secondary .search-form:focus-within .search-field,
body #page #colophon .search-form:focus-within .search-field {
    border-color: rgba(246, 196, 83, .75) !important;
    background: linear-gradient(135deg, rgba(28, 35, 35, .98), rgba(8, 16, 28, .99)) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .06),
        0 0 22px rgba(246, 196, 83, .14) !important;
}

body #page .search-form .search-field:focus,
body #page input.bloghash-input-search[type="search"]:focus {
    outline: none !important;
}

/* Đưa icon tìm kiếm về bên trái trong ô input */
body #page .search-form:not(.dhtft-quick-search-widget .search-form) .search-submit,
body #page .widget_search .search-submit,
body #page #main .search-form .search-submit,
body #page #secondary .search-form .search-submit,
body #page #colophon .search-form .search-submit {
    position: absolute !important;
    left: 10px !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;

    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #67e8f9 !important;
    box-shadow: none !important;
    z-index: 2 !important;
    cursor: pointer !important;
    transition: color .2s ease, background .2s ease, transform .2s ease !important;
}

body #page .search-form:not(.dhtft-quick-search-widget .search-form) .search-submit:hover,
body #page .widget_search .search-submit:hover,
body #page #main .search-form .search-submit:hover,
body #page #secondary .search-form .search-submit:hover,
body #page #colophon .search-form .search-submit:hover,
body #page .search-form:not(.dhtft-quick-search-widget .search-form):focus-within .search-submit,
body #page .widget_search .search-form:focus-within .search-submit,
body #page #main .search-form:focus-within .search-submit,
body #page #secondary .search-form:focus-within .search-submit,
body #page #colophon .search-form:focus-within .search-submit {
    color: #f6c453 !important;
    background: rgba(246, 196, 83, .08) !important;
}

body #page .search-form .search-submit svg {
    width: 16px !important;
    height: 16px !important;
    top: auto !important;
    vertical-align: middle !important;
}

/* WordPress block search nếu có dùng Gutenberg Search */
body #page .wp-block-search .wp-block-search__inside-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: 0 !important;
    padding: 0 !important;
}

body #page .wp-block-search input[type="search"],
body #page .wp-block-search .wp-block-search__input {
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 15px !important;
    border: 1px solid rgba(47, 213, 255, .42) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(13, 30, 40, .94), rgba(7, 14, 24, .98)) !important;
    color: rgba(255, 255, 255, .94) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .035),
        0 0 18px rgba(47, 213, 255, .10) !important;
}

body #page .wp-block-search .wp-block-search__button {
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(47, 213, 255, .42) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(13, 30, 40, .94), rgba(7, 14, 24, .98)) !important;
    color: #67e8f9 !important;
    font-weight: 800 !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .035),
        0 0 18px rgba(47, 213, 255, .10) !important;
}

body #page .wp-block-search .wp-block-search__button:hover,
body #page .wp-block-search:focus-within .wp-block-search__button {
    border-color: rgba(246, 196, 83, .75) !important;
    color: #fff7d6 !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .06),
        0 0 22px rgba(246, 196, 83, .14) !important;
}

/* Mobile */
@media (max-width: 480px) {
    body #page .search-form .search-field,
    body #page input.bloghash-input-search[type="search"],
    body #page .wp-block-search input[type="search"],
    body #page .wp-block-search .wp-block-search__input {
        min-height: 44px !important;
        height: 44px !important;
        line-height: 44px !important;
        font-size: 13px !important;
        border-radius: 9px !important;
    }

    body #page .search-form .search-submit {
        left: 9px !important;
    }
}

/* ================================================================
   DoiHinhTFT.VN — Fix riêng cho ô tìm kiếm custom TapApp
   HTML thực tế: <input type="text" id="tap-search" ...>
   ================================================================ */
html body input#tap-search,
html body input#tap-search[type="text"],
html body #tap-search {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 15px !important;
    margin: 0 !important;
    box-sizing: border-box !important;

    border: 1px solid rgba(47, 213, 255, .42) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(13, 30, 40, .94), rgba(7, 14, 24, .98)) !important;
    color: rgba(255, 255, 255, .94) !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 48px !important;
    letter-spacing: .01em !important;
    caret-color: #f6c453 !important;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .035),
        0 0 18px rgba(47, 213, 255, .10) !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, color .22s ease, transform .22s ease !important;
}

html body input#tap-search::placeholder,
html body input#tap-search[type="text"]::placeholder,
html body #tap-search::placeholder {
    color: rgba(230, 230, 230, .46) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}
html body input#tap-search::-webkit-input-placeholder { color: rgba(230, 230, 230, .46) !important; font-weight: 500 !important; }
html body input#tap-search::-moz-placeholder { color: rgba(230, 230, 230, .46) !important; opacity: 1 !important; font-weight: 500 !important; }

html body input#tap-search:hover,
html body input#tap-search:focus,
html body #tap-search:hover,
html body #tap-search:focus {
    border-color: rgba(246, 196, 83, .75) !important;
    background: linear-gradient(135deg, rgba(28, 35, 35, .98), rgba(8, 16, 28, .99)) !important;
    color: #fff !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .06),
        0 0 22px rgba(246, 196, 83, .14) !important;
    outline: none !important;
}

@media (max-width: 480px) {
    html body input#tap-search,
    html body input#tap-search[type="text"],
    html body #tap-search {
        min-height: 44px !important;
        height: 44px !important;
        line-height: 44px !important;
        font-size: 13px !important;
        border-radius: 9px !important;
    }
}
