﻿/* Header (2026-10-06): cụm liên hệ + ô tìm kiếm.
   Bố cục B: "Cấp cứu" là khối lớn bên trái; "Hotline" và "Tư vấn KCB" xếp dọc bên phải.
   File riêng, nạp kèm ?v=... trong skin để trình duyệt không dùng bản cache cũ. */

/* ---- Mặc định (điện thoại, tablet): 3 nút xếp dọc, bằng nhau ---- */
header .hotline-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    float: none;
    margin: 0;
    padding: 0;
}

header .hotline-buttons a.hl-btn,
header .hotline-buttons a.hl-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 5px 16px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    color: #fff;
    font-family: 'Roboto Condensed', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

header .hotline-buttons .hl-emergency { background-color: #d93025; }
header .hotline-buttons .hl-hotline   { background-color: #0f9a47; }

/* Nút Tư vấn KCB: kiểu viền xanh, nền trắng */
header .hotline-buttons a.hl-consult,
header .hotline-buttons a.hl-consult:visited {
    background-color: #fff;
    color: #0f9a47;
    border-color: #0f9a47;
}

/* Hover: nền vàng nhẹ, chữ/icon đậm để dễ đọc, bóng đổ giảm */
header .hotline-buttons a.hl-btn:hover,
header .hotline-buttons a.hl-btn:focus,
header .hotline-buttons a.hl-btn:active {
    background-color: #ffe27a;
    border-color: #f2c744;
    color: #3d2f00;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

header .hotline-buttons .hl-ico { width: 14px; height: 14px; flex: 0 0 14px; }

/* Nút Cấp cứu: nhãn + số. Chế độ 1 dòng: "Cấp cứu 24/7: 0258 3837 878" */
header .hotline-buttons .hl-text { display: inline; }
header .hotline-buttons .hl-label::after { content: ":"; }
header .hotline-buttons .hl-num { margin-left: .3em; }

/* ---- Từ 768px: logo - cụm liên hệ - ô tìm kiếm cùng một hàng ---- */
@media (min-width: 768px) {
    header.banner_bg > .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    header.banner_bg > .container::before,
    header.banner_bg > .container::after { display: none; content: none; }

    header.banner_bg > .container > div:first-child { flex: 0 0 auto; }

    header .hotline-buttons { margin: 0 auto; }

    header.banner_bg .Searpane {
        float: none;
        position: relative;
        top: 0;
        right: 0;
        margin: 0;
        width: 150px;
        flex: 0 0 150px;
    }
}

/* Tablet (768-991px): giữ 3 nút dọc, thu nhỏ logo cho vừa chỗ */
@media (min-width: 768px) and (max-width: 991px) {
    header.banner_bg > .container { gap: 12px; }
    header .hotline-buttons { gap: 6px; }
    header .hotline-buttons a.hl-btn { font-size: 13px; padding: 5px 13px; }
    header.banner_bg #dnn_dnnLOGO_imgLogo { height: 90px; width: auto; }
}

/* ---- Từ 992px: BỐ CỤC B ---- */
@media (min-width: 992px) {
    header.banner_bg > .container { gap: 14px; }
    header.banner_bg .Searpane { width: 180px; flex: 0 0 180px; }

    header .hotline-buttons {
        display: grid;
        grid-template-columns: auto 164px;
        grid-template-rows: 1fr 1fr;
        gap: 5px 7px;
        align-items: stretch;
    }

    header .hotline-buttons .hl-emergency { grid-column: 1; grid-row: 1 / span 2; }
    header .hotline-buttons .hl-hotline   { grid-column: 2; grid-row: 1; }
    header .hotline-buttons .hl-consult   { grid-column: 2; grid-row: 2; }

    header .hotline-buttons a.hl-btn,
    header .hotline-buttons a.hl-btn:visited { font-size: 12px; padding: 4px 10px; gap: 5px; }

    header .hotline-buttons a.hl-emergency,
    header .hotline-buttons a.hl-emergency:visited {
        justify-content: flex-start;
        gap: 7px;
        padding: 3px 14px 3px 11px;
    }

    header .hotline-buttons .hl-emergency .hl-ico { width: 16px; height: 16px; flex-basis: 16px; }

    header .hotline-buttons .hl-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.15;
    }

    header .hotline-buttons .hl-label {
        font-size: 11px;
        letter-spacing: .3px;
        text-transform: uppercase;
        opacity: .92;
    }

    header .hotline-buttons .hl-label::after { content: none; }
    header .hotline-buttons .hl-num { margin: 0; font-size: 12px; }
}

@media (min-width: 1200px) {
    header.banner_bg .Searpane { width: 200px; flex-basis: 200px; }
    header .hotline-buttons { grid-template-columns: auto 184px; gap: 6px 8px; }
    header .hotline-buttons a.hl-btn,
    header .hotline-buttons a.hl-btn:visited { font-size: 13px; padding: 4px 12px; gap: 6px; }
    header .hotline-buttons a.hl-emergency,
    header .hotline-buttons a.hl-emergency:visited { padding: 3px 16px 3px 13px; gap: 8px; }
    header .hotline-buttons .hl-num { font-size: 13px; }
}

/* ---- Điện thoại: 3 nút xếp dọc, bằng nhau, căn giữa dưới logo ---- */
@media (max-width: 767px) {
    header .hotline-buttons {
        clear: both;
        width: max-content;
        max-width: 100%;
        margin: 0 auto;
        padding: 8px 10px;
    }
    header .hotline-buttons a.hl-btn { font-size: 13px; padding: 6px 13px; }
}

@media (max-width: 400px) {
    header .hotline-buttons a.hl-btn { font-size: 12px; padding: 6px 10px; gap: 5px; }
}

/* ===== Ô tìm kiếm trong header: dạng viên thuốc + icon kính lúp (2026-10-06) ===== */
header .Searpane .DNNModuleContent { position: relative; }

header .Searpane .search-input {
    display: block;
    width: 100%;
    height: 38px;
    box-sizing: border-box;
    padding: 0 42px 0 16px;
    border: 1px solid #d3dbe1;
    border-radius: 999px;
    background: #fff;
    color: #333;
    font-size: 14px;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    transition: border-color .2s ease, box-shadow .2s ease;
}

header .Searpane .search-input::placeholder { color: #8a97a3; opacity: 1; }
header .Searpane .search-input:hover { border-color: #aab7c2; }
header .Searpane .search-input:focus {
    border-color: #1089b9;
    box-shadow: 0 0 0 3px rgba(16, 137, 185, .15);
}

/* Icon kính lúp vẽ bằng SVG; nút ảnh gốc (search.png) giữ nguyên chức năng nhưng ẩn đi, phủ đúng vùng icon */
header .Searpane .DNNModuleContent::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566b7a' stroke-width='2.4' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><line x1='15.5' y1='15.5' x2='21' y2='21'/></svg>") no-repeat center / contain;
    pointer-events: none;
    transition: opacity .2s ease;
}

header .Searpane .DNNModuleContent:hover::after,
header .Searpane .DNNModuleContent:focus-within::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231089b9' stroke-width='2.4' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><line x1='15.5' y1='15.5' x2='21' y2='21'/></svg>");
}

header .Searpane .SearchButton {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 38px;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}
