/*
 * Gom các \3c style> inline nằm ngay trong view PHP gốc (trenvl/app/Views/travel/*.php) mà
 * không nằm trong bất kỳ file .css riêng nào — dễ bị bỏ sót khi chỉ port theo <link
 * rel="stylesheet"> ở đầu view. Nguồn gốc từng khối ghi rõ bên dưới, không gộp/đổi tên class.
 */

/*
 * Khắc phục CSS rò rỉ từ layout.css (load global mọi trang public ở Next.js, nhưng
 * travel_view.php/theme_main.php/theme_view.php KHÔNG hề load layout.css trên production).
 * layout.css có `div#container { display:flex; width:100%; margin-left:auto }` dành cho layout
 * admin cũ, vô tình khớp trúng `<div id="container" class="sub view_container">` của các trang
 * này (id/class copy nguyên từ view gốc, cần giữ `id="container"` vì `#container.view_container`
 * trong sub.css — qua @import của style.css — mới là rule tạo padding đúng của trang con).
 * Ghi đè lại 3 thuộc tính layout.css chèn nhầm, đặc hiệu hơn (110 > 101) nên tự thắng mà không
 * cần !important. Xem feedback_trenvl_nextjs_global_css_leak.md.
 */
#container.view_container {
    display: block;
    width: auto;
    margin-left: 0;
}

/* travel-tips.php (trang /k-stories) */
.travel-tips .item img {
    width: unset;
    height: unset;
    border-radius: var(--qc-radius-control, 8px);
    object-fit: cover;
}

.travel-tips .swiper-button-next:after,
.travel-tips .swiper-button-prev:after {
    content: "" !important;
    display: none !important;
}

.travel-tips .tra_sec_02_swiper_btn_next,
.travel-tips .tra_sec_02_swiper_btn_prev {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-top: -30px;
}

.tra_sec_02_swiper ._text_box h3,
.tra_sec_02_swiper ._text_box h5 {
    font-size: var(--qc-text-24, 24px);
    font-weight: 700;
    margin-bottom: 16px;
}

.travel-tips .sec_06 .magazine_item_ {
    position: relative;
}

.travel-tips .sec_06 .img_box {
    position: relative;
    overflow: hidden;
    border-radius: var(--qc-radius-control, 8px);
}

.travel-tips .sec_06 .img_box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--qc-radius-control, 8px);
    display: block;
}

.travel-tips .sec_06 .img_box__shadow {
    background-color: #ffffff33;
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 100%;
    z-index: 2;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.travel-tips .sec_06 .magazine_content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow: hidden;
    border-radius: var(--qc-radius-control, 8px);
    background: linear-gradient(to bottom, #2c6baec2, #2c6baec2 50%, #ffffff33 70%, #ffffff33 90%, #2c6bae1a);
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.travel-tips .sec_06 .magazine_content_txt {
    font-size: var(--qc-text-24, 24px);
    font-family: "Pretendard", sans-serif;
    color: #ffffff;
    font-weight: bold;
    line-height: 1.4;
    position: absolute;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    min-width: 65%;
    text-align: center;
}

.travel-tips .sec_06 .magazine_item_:hover .img_box__shadow,
.travel-tips .sec_06 .magazine_item_:hover .magazine_content {
    opacity: 1;
    transform: translateY(0);
}

@media screen and (max-width: 850px) {
    .travel-tips .tra_sec_02_swiper ._text_box h3,
    .travel-tips .tra_sec_02_swiper ._text_box h5 {
        font-size: var(--qc-text-18, 18px);
        font-weight: 700;
        margin-bottom: 2rem;
    }

    .travel-tips .sec_06 .magazine_content_txt {
        font-size: var(--qc-text-12, 12px);
        top: 2rem;
    }
}


/* hot-place.php (/k-stories/hot-place...) */
.hot_place .search_form {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hot_place .search_form .total_ {
    font-weight: bold;
}

.hot_place .search_form .total_ span {
    color: #1AADFF;
}

@media screen and (max-width: 850px) {
    .hot_place .search_form {
        align-items: unset;
        gap: 3rem;
        flex-direction: column;
    }

    .hot_place .input_search_box {
        width: 100%;
    }
}

/* theme_travel.php (/k-stories/theme_travel...) */
@media screen and (max-width: 850px) {
    .theme_travel .head_list_product .wrap_select {
        display: none;
    }
}

/* view_detail.php (/k-stories/view_detail/[lg_idx]) — khối 1 */
.view_detail .wrap_star {
    display: flex;
    gap: 25px;
}

.view_detail .flex_btn_qna {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.view_detail .flex_btn_qna button {
    padding: 8px 12px;
    border-radius: var(--qc-radius-xs, 4px);
    border: 1px solid #dbdbdb;
    background-color: #fff;
}

.view_detail .flex_btn_qna button.btn_delete {
    background-color: rgba(239, 56, 56, 0.85);
    color: #ffffff;
}

.view_detail .form_edit {
    width: 100%;
    padding: 10px 0;
    display: none;
}

.view_detail .form_edit .textarea {
    width: 100%;
    padding: 10px;
    height: 100px;
    border-radius: var(--qc-radius-xs, 4px);
}

.view_detail .form_edit .btn_change {
    padding: 8px 12px;
    border-radius: var(--qc-radius-xs, 4px);
    border: 1px solid #1AADFF;
    background-color: #1AADFF;
    color: #ffffff;
    margin-top: 10px;
}

.custom-golf-detail .qa-item .qa-wrap {
    flex-wrap: wrap;
}

.list-icon {
    margin-left: auto;
}

.content-sub-hotel-detail .rating-container img:first-child {
    padding: 8px 6px;
}

.content-sub-hotel-detail .rating-container img {
    vertical-align: top;
    max-width: 100%;
    width: unset;
    height: auto;
    -webkit-backface-visibility: hidden;
}

@media screen and (max-width: 850px) {
    .content-sub-hotel-detail .rating-container img:first-child {
        width: unset;
        height: unset;
        margin-right: .6rem;
    }

    .content-sub-hotel-detail .rating-container img {
        width: 6rem;
        height: 6.5rem;
    }
}

/* view_detail.php — khối 2 */
.view_detail .flex_item {
    display: flex;
    align-items: end;
}

.view_detail .section6 .qa_ques {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: var(--qc-text-18, 18px);
    font-weight: 500;
    margin-bottom: 33px;
}

.view_detail .comment_box {
    border-top: 1px solid #dbdbdb;
    border-bottom: 1px solid #dbdbdb;
    margin-top: 25px;
}

.view_detail .comment_box .item {
    padding: 24px 50px 24px 20px;
}

.view_detail .comment_box .item+.item {
    border-top: 1px solid #f1f1f1;
}

.view_detail .comment_box .item .info {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.view_detail .comment_box .item .info .time {
    font-size: var(--qc-text-18, 18px);
    font-weight: 400;
    color: #bbb;
}

.view_detail .comment_box .item .info .name {
    font-size: var(--qc-text-18, 18px);
    font-weight: 600;
    white-space: nowrap;
}

.view_detail .comment_box .item .content {
    font-size: var(--qc-text-18, 18px);
}

.view_detail {
    padding-bottom: 100px;
}

.custom-golf-detail .golf-table tbody td {
    white-space: wrap;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.view_detail .comment_box .item .info .eval {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.view_detail .comment_box .item .info .eval span {
    margin-left: 3px;
}

.list_star {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.list_star i.star_img {
    width: 20px;
    height: 20px;
    background-image: url(/images/sub/star_ic_r.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.15s ease;
}

.list_star i.star_img:hover {
    transform: scale(1.15);
}

.list_star i.star_img.on {
    background-image: url(/images/ico/star_on.png);
}

.view_detail .comment_box-input {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
    align-items: stretch !important;
    margin-top: 10px !important;
}

.view_detail .comment_box-input textarea,
.view_detail .comment_box-input .bs-input {
    flex: 1 1 auto !important;
    width: calc(100% - 110px) !important;
    height: 100px !important;
    min-height: 100px !important;
    padding: 16px 20px !important;
    border: 1px solid #dbdbdb !important;
    border-radius: var(--qc-radius-xs, 4px) !important;
    resize: none !important;
    box-sizing: border-box !important;
    font-size: var(--qc-text-15, 15px) !important;
    line-height: 1.5 !important;
}

.view_detail .comment_box-input .comment_btn {
    flex: 0 0 100px !important;
    width: 100px !important;
    height: 100px !important;
    background-color: var(--bs-point, #1955c4) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--qc-radius-xs, 4px) !important;
    font-size: var(--qc-text-16, 16px) !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media screen and (max-width: 850px) {
    .view_detail .wrap_star {
        display: flex;
        gap: 2.5rem;
    }

    .list_star {
        display: flex;
        gap: 0.5rem;
        margin-top: -0.5rem;
    }

    .view_detail .section6 .qa_ques {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1.8rem;
        font-size: var(--qc-text-16, 16px);
        font-weight: 500;
        margin-top: 7.3rem;
    }

    .view_detail .section6 .qa_ques .list_star img {
        width: 2.8rem;
    }

    .view_detail .comment_box {
        border-top: 1px solid #dbdbdb;
        border-bottom: 1px solid #dbdbdb;
        margin-top: 3rem;
    }

    .view_detail .comment_box .item {
        padding: 3rem 0 3rem 3rem;
    }

    .view_detail .comment_box .item .info {
        display: flex;
        align-items: start;
        gap: 3rem;
        margin-bottom: 2.8rem;
    }

    .view_detail .comment_box .item .info .name {
        font-size: var(--qc-text-16, 16px);
        font-weight: 600;
    }

    .view_detail .comment_box .item .info .time {
        font-size: var(--qc-text-16, 16px);
        font-weight: 400;
        color: #bbb;
    }

    .view_detail .comment_box .item .content {
        font-size: var(--qc-text-16, 16px);
    }

    .content-sub-hotel-detail .main {
        width: unset;
    }

    .view_detail {
        padding-bottom: 12rem;
    }

    .view_detail .comment_box .item .info .eval {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 0px;
    }

    .view_detail .comment_box .item .info .eval span {
        margin-left: 0.7rem;
    }

    .content-sub-hotel-detail .location-container {
        gap: 0.8rem;
        display: flex;
        align-items: flex-start;
        flex-direction: row;
        margin-bottom: 2rem;
        margin-top: 1rem;
    }

    .view_detail .comment_box .item .info .eval img {
        width: 2.5rem;
    }
}

/* Reserve the hero banner box (mobile and web variants) before the image arrives: without it the
   banner grew from 0 after load and pushed every section down (CLS ~0.17 mobile, ~0.09 web). */
.travel-tips .sec_banner img.only_mo {
  aspect-ratio: 660 / 240;
  height: auto;
  object-fit: cover;
}
.travel-tips .sec_banner img.only_web {
  aspect-ratio: 1200 / 150;
  height: auto;
  object-fit: cover;
}


/* theme_view (K-Stories hotel theme view) */
.theme_sect.monkey_theme .theme_nbox {
    height: auto;
    min-height: 670px;
    margin-bottom: 40px;
}

.theme_sect.monkey_theme .theme_nbox .box_top .imgbox {
    position: relative;
    overflow: hidden;
}

.theme_sect.monkey_theme .theme_nbox .box_top .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme_sect.monkey_theme .theme_nbox .imgbox_bot span {
    border-radius: var(--qc-radius-card, 16px);
    overflow: hidden;
}

.theme_sect.monkey_theme .theme_nbox .imgbox_bot span img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.theme_sect.monkey_theme .theme_tab01.theme_tab ul li {
    border-bottom: 0 !important;
}

/* view_detail review form (CommentBox): the textarea fills the row next to the 100px button,
   as .bs-input did in travel/view_detail.php. */
.view_detail .cmt_area .list_star {
    margin-bottom: 12px;
}

.view_detail .cmt_area .comment_box-input {
    display: flex;
    gap: 10px;
    width: 100%;
}

.view_detail .cmt_area .comment_box-input textarea {
    flex: 1;
    min-width: 0;
    height: 100px;
    padding: 12px 14px;
    border: 1px solid #dbdbdb;
    border-radius: var(--qc-radius-xs, 4px);
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
}

.view_detail .cmt_area .comment_box-input .comment_btn {
    flex: 0 0 100px;
    height: 100px !important;
    margin-left: 0;
}

@media screen and (max-width: 850px) {
    .view_detail .cmt_area .comment_box-input textarea,
    .view_detail .cmt_area .comment_box-input .comment_btn {
        height: 88px !important;
    }

    .view_detail .cmt_area .comment_box-input .comment_btn {
        flex-basis: 72px;
    }
}
