/* CSS chỉ dành cho khối kết quả Mai Hoa: #mh-result-wrap / #mh-result */
:root {
    --highlight-color: #ff3110;
    --green-color: #00a800;
    --blue-color: #3333FF;
    --secondary-color: #888888;
    --kim-color: #999999;
    --moc-color: #009130;
    --thuy-color: #000000;
    --hoa-color: #FF0000;
    --tho-color: #FFA000;
}
.fortune-form-box{
    padding: 20px;
    width: 660px;
    clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 30px 100%, 0 calc(100% - 16px), 0 16px);
    position: absolute;
    background: var(--Alpha-White---100, #FFF);
    margin-top: -100px;
    margin-left: 120px;
}
.box-btn-download {
    display: flex;
    justify-content: center;
}
#btn-tai-anh-mh {
    border-radius: 4px;
    background: var(--Pink---main, #EE2C79);
    box-shadow: 2px 3px 0 0 var(--Pink---strong, #9B1E64);
    display: flex;
    height: 48px;
    padding: 0 16px;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: var(--Text-White---Primary, #FFF);
    text-align: center;
    font-family: Archivo;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 22px;
    width: 140px;
    margin-top: 16px;
}
.fortune-grid-2{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:30px;
    margin-bottom:30px;
}
.breadcrumb { 
    padding-top: 400px;
}
.fortune-grid-3{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-bottom:16px;
}

.form-group label{
    display:block;
    margin-bottom:12px;
    color: var(--Alpha-Black---100, #111);
    font-family: Archivo;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

.form-group input,
.form-group select{
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--Alpha-Black---20, rgba(17, 17, 17, 0.20));
    background: var(--Gray---02, #F9F9F9);
    display: flex;
    height: 48px;
    padding: 0 16px;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    color: var(--Text-Black---Primary, #111);
    font-family: Archivo;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 22px;
}

.fortune-submit{
    width:100%;
    border:none;
    cursor:pointer;
    display: flex;
    height: 40px;
    padding: 0 12px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    grid-row: 4 / span 1;
    grid-column: 1 / span 6;
    justify-self: stretch;
    border-radius: 4px;
    background: var(--Pink---main, #EE2C79);
    box-shadow: 2px 3px 0 0 var(--Pink---strong, #9B1E64);
    color: var(--Text-White---Primary, #FFF);
    text-align: center;
    font-family: Archivo;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 22px;
}

@media(max-width:768px){

    .fortune-form-box{
        width: 100%;
        padding:20px;
        margin-top: 100px;
        margin-left:0px;
    }
    .form-group input, .form-group select {
        height: 40px;
    }
    .box-breadcrumb {
        padding-top: 0px;
        margin-top: -200px;
    }
}
@font-face {
    font-family: UTM-Azuki;
    src: url('/assets/fonts/UTM-Azuki.ttf');
    font-display: swap;
}

#mh-result-wrap,
#mh-result-wrap * {
    box-sizing: border-box;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

#mh-result-wrap {
    width: 100%;
    overflow: hidden;
    background-color: transparent;
    color: #000;
    position: relative;
}

#mh-result {
    width: 748px;
    min-width: 748px;
    max-width: 748px;
    background-color: #f1ece3;
    color: #000;
    position: relative;
    transform-origin: top left;
    overflow: hidden;
     margin-left: auto;
    margin-right: auto;
}

#mh-result::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #000;
    z-index: 1;
    pointer-events: none;
}

#mh-result .tt-logo {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 2;
}

#mh-result .title-la-so-thien-ban {
    font-family: UTM-Azuki, Roboto, Arial, sans-serif;
    font-size: 29px;
    line-height: 31px;
    letter-spacing: normal;
}

#mh-result .txt-sub-content-bold {
    font-size: .875rem;
    font-weight: 700;
}

#mh-result .font-weight-medium {
    font-weight: 500;
}

#mh-result .font-weight-bold {
    font-weight: 700;
}

#mh-result .color-title {
    color: #183761;
}

#mh-result .color-blue {
    color: var(--blue-color);
}

#mh-result .color-secondary {
    color: var(--secondary-color);
}

#mh-result .color-highlight {
    color: var(--highlight-color);
}

#mh-result .mh-kim { color: var(--kim-color); }
#mh-result .mh-moc { color: var(--moc-color); }
#mh-result .mh-thuy { color: var(--thuy-color); }
#mh-result .mh-hoa { color: var(--hoa-color); }
#mh-result .mh-tho { color: var(--tho-color); }

#mh-result .mh-text-xs { font-size: 10px; }
#mh-result .mh-text-sm { font-size: 12px; }
#mh-result .mh-text-md { font-size: 14px; }
#mh-result .mh-text-lg { font-size: 17px; }

#mh-result .mh-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

#mh-result .mh-table td,
#mh-result .mh-table th {
    text-align: center;
    padding: 5px 3px;
    vertical-align: middle;
    overflow: hidden;
    border: 1px solid #000;
    color: #000;
    line-height: 1.3;
}

#mh-result .mh-label {
    background: #fef6ce;
    color: var(--green-color);
    font-weight: 700;
    text-transform: uppercase;
}

#mh-result .mh-hao {
    width: 100%;
    height: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 3px auto;
}

#mh-result .mh-hao.duong span {
    width: 100%;
    height: 100%;
    background: var(--hoa-color);
    display: block;
}

#mh-result .mh-hao.am span {
    width: 40%;
    height: 100%;
    background: var(--thuy-color);
    display: inline-block;
}

#mh-result .mh-hao.dong span {
    background: var(--highlight-color) !important;
    box-shadow: 0 0 10px 4px rgba(146, 23, 23, .7);
    animation: mh-dong-pulse 1.2s ease-in-out infinite;
}

@keyframes mh-dong-pulse {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 0 4px rgba(0, 0, 0, .4); }
}

#mh-result .mh-quai-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#mh-result .mh-quai-group .mh-hao {
    width: 140px;
    height: 12px;
}

#mh-result .mh-quai-separator {
    width: 70%;
    height: 1px;
    background-color: rgba(0, 0, 0, .2);
    margin: 4px 0;
}

#mh-result .mh-quai-kim .mh-hao.duong span,
#mh-result .mh-quai-kim .mh-hao.am span {
    background: var(--kim-color) !important;
}

#mh-result .mh-quai-moc .mh-hao.duong span,
#mh-result .mh-quai-moc .mh-hao.am span {
    background: var(--moc-color) !important;
}

#mh-result .mh-quai-thuy .mh-hao.duong span,
#mh-result .mh-quai-thuy .mh-hao.am span {
    background: var(--thuy-color) !important;
}

#mh-result .mh-quai-hoa .mh-hao.duong span,
#mh-result .mh-quai-hoa .mh-hao.am span {
    background: var(--hoa-color) !important;
}

#mh-result .mh-quai-tho .mh-hao.duong span,
#mh-result .mh-quai-tho .mh-hao.am span {
    background: var(--tho-color) !important;
}

#mh-result .mh-quai-kim .mh-hao.am span,
#mh-result .mh-quai-moc .mh-hao.am span,
#mh-result .mh-quai-thuy .mh-hao.am span,
#mh-result .mh-quai-hoa .mh-hao.am span,
#mh-result .mh-quai-tho .mh-hao.am span {
    opacity: .6;
}

#mh-result .mh-hao-dong {
    background-color: #f7e6c2;
}

#mh-result .mh-hao-dong td {
    font-weight: 700;
    color: var(--highlight-color);
}

#mh-result .mh-dong-label {
    color: var(--highlight-color);
    font-size: 10px;
    display: block;
    margin-top: 8px;
}

#mh-result .mh-lt-quan-quy { color: #b91c1c; font-weight: 700; }
#mh-result .mh-lt-tu-ton { color: #15803d; }
#mh-result .mh-lt-the-tai { color: #a16207; }
#mh-result .mh-lt-phu-mau { color: #1d4ed8; }
#mh-result .mh-lt-huynh-de { color: #78350f; }

#mh-result .mh-luc-thu-thanh-long { color: #17922b; }
#mh-result .mh-luc-thu-chu-tuoc { color: #c82e2e; }
#mh-result .mh-luc-thu-cau-tran { color: #925417; }
#mh-result .mh-luc-thu-dang-xa { color: #7f1d1d; }
#mh-result .mh-luc-thu-bach-ho { color: #928217; }
#mh-result .mh-luc-thu-huyen-vu { color: #175492; }

#mh-result .mh-vs-vuong { color: var(--green-color); }
#mh-result .mh-vs-huu { color: var(--blue-color); }
#mh-result .mh-vs-tu { color: var(--highlight-color); }

#mh-result .mh-quai-symbol {
    font-size: 28px;
    line-height: 1;
}

#mh-result [data-tooltip]:not([data-tooltip='']) {
    position: relative;
    cursor: help;
}

#mh-result td:has([data-tooltip]:not([data-tooltip=''])) {
    overflow: visible !important;
}

#mh-result [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    white-space: normal;
    max-width: 280px;
    min-width: 160px;
    width: max-content;
    line-height: 1.5;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    text-transform: none;
    font-family: Arial, sans-serif;
    text-align: left;
}

#mh-result [data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #1a1a2e;
    z-index: 1001;
    pointer-events: none;
}
/* ===== FIX HEADER KẾT QUẢ MAI HOA - dùng cho HTML hiện tại đang có d-flex ===== */

#mh-result > .d-flex:first-of-type {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 128px;
    border-bottom: 1px solid #000;
    position: relative;
    z-index: 2;
}

#mh-result > .d-flex:first-of-type > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    padding: 8px 12px !important;
}

#mh-result > .d-flex:first-of-type > div:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 128px;
    padding: 8px 10px 8px 8px !important;
    border-left: 1px solid #000 !important;
    font-size: 12px;
    line-height: 1.35;
}
.btn-tai-anh-que {
    margin-top: 20px;
}
#mh-result > .d-flex:first-of-type > div:nth-child(2) > .d-flex {
    display: grid !important;
    grid-template-columns: 82px 1fr;
    align-items: start;
    width: 100%;
    line-height: 1.35;
}

#mh-result > .d-flex:first-of-type > div:nth-child(2) .w-25,
#mh-result > .d-flex:first-of-type > div:nth-child(2) .w-75 {
    width: auto !important;
}

#mh-result > .d-flex:first-of-type .txt-sub-content-bold {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    margin-bottom: 3px;
}

#mh-result > .d-flex:first-of-type a {
    display: inline-block;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
    color: #3333ff !important;
    text-decoration: none;
    margin-bottom: 4px;
}

#mh-result > .d-flex:first-of-type .title-la-so-thien-ban {
    font-family: UTM-Azuki, Roboto, Arial, sans-serif;
    font-size: 29px;
    line-height: 31px;
    color: #000;
    margin-bottom: 5px;
    font-weight: 700;
}

#mh-result > .d-flex:first-of-type .mh-text-sm {
    font-size: 12px;
    line-height: 1.35;
}

#mh-result > .d-flex:first-of-type .font-weight-medium {
    font-weight: 500;
}

#mh-result > .d-flex:first-of-type .color-title {
    color: #183761;
}

#mh-result .tt-logo {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 80px;
    height: 40px;
    object-fit: contain;
    z-index: 3;
}

/* =========================
   MOBILE RESPONSIVE - MAI HOA
   Thêm ở cuối file CSS
========================= */

@media (max-width: 991px) {
    .lvn-page {
        overflow-x: hidden;
    }

    .container-custom {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .lvn-grid {
        display: block !important;
    }

    .right-content {
        margin-top: 20px;
    }

    .lvn-card {
        padding: 14px;
        border-radius: 12px;
    }

    .lvn-title h1,
    .lvn-title h2 {
        font-size: 22px;
        line-height: 1.35;
    }

    .lvn-title p {
        font-size: 14px;
        line-height: 1.5;
    }

    .form-block {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-group.two,
    .form-group.three {
        width: 100% !important;
    }

    .form-control {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
    }

    .form-btn {
        width: 100%;
        min-height: 46px;
        font-size: 16px;
    }

    .form-note {
        font-size: 13px;
        line-height: 1.5;
    }
}

@media (max-width: 767px) {
    #mai-hoa-result-card {
        padding-left: 8px;
        padding-right: 8px;
    }

    .result-content {
        width: 100%;
        overflow: hidden;
    }

    #mh-result-wrap {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin-left: auto;
        margin-right: auto;
    }

    #mh-result {
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform-origin: top left !important;
    }

    #mh-result .tt-logo {
        width: 44px;
        height: 44px;
        top: 6px;
        right: 6px;
    }

    .btn-tai-anh-que {
        width: 100%;
        min-height: 44px;
        margin-top: 14px;
        font-size: 15px;
        text-align: center;
    }

    .d-flex.justify-content-end {
        justify-content: center !important;
    }
}

@media (max-width: 575px) {
    .container,
    .container-custom {
        padding-left: 10px;
        padding-right: 10px;
    }

    .row.ml-0.mr-0,
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .p-l-10 {
        padding-left: 0 !important;
    }

    .p-r-10 {
        padding-right: 0 !important;
    }

    .lvn-card {
        padding: 12px !important;
    }

    .lvn-title h1,
    .lvn-title h2 {
        font-size: 20px;
    }

    .lvn-title h1 span {
        display: inline-block;
        margin-right: 4px;
    }

    #mh-result {
        box-shadow: none;
    }

    #mh-result [data-tooltip]:hover::after,
    #mh-result [data-tooltip]:hover::before {
        display: none;
    }
}

@media (max-width: 390px) {
    .lvn-card {
        padding: 10px;
    }

    .lvn-title h1,
    .lvn-title h2 {
        font-size: 18px;
    }

    .form-control {
        font-size: 14px;
    }

    .btn-tai-anh-que {
        font-size: 14px;
    }
}