/*
Theme Name: VSS Customize
Description: This is a child theme for Flatsome Theme Develop by Việt Lâm Coder
Author: VSS Corporation
Template: flatsome
Version: 3.0
*/

.post_comments {
    display: none;
}

/* ============================================================
   Fix chiều cao đồng đều cho slider testimonial (.slider-brand)
   Flickity adaptiveHeight gây nhảy chiều cao khi chuyển slide
   ============================================================ */

/* Ngăn viewport tự co lại khi chuyển slide */
.slider-brand .flickity-viewport {
    /* transition: none !important; */
    min-height: 540px; /* Tăng nếu slide dài nhất cao hơn */
}

/* Đảm bảo các box trong slide chiếm full height */
.slider-brand .flickity-slider > .row {
    display: flex;
    align-items: stretch;
}

.slider-brand .flickity-slider > .row > .col > .col-inner {
    height: 100%;
}

.slider-brand .box.parnter-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.slider-brand .box.parnter-item .box-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive: mobile thường chỉ show 1 slide, chiều cao thấp hơn */
@media (max-width: 549px) {
    .slider-brand .flickity-viewport {
        min-height: 480px;
    }
}

/* ============================================================
   Chặn tải ảnh cho UX Gallery & Lightbox
   ============================================================ */

/* 1. Ngăn chặn việc lựa chọn hình ảnh và kéo thả trên trình duyệt */
.gallery-box img,
.mfp-content img,
.mfp-gallery img {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;     /* Konqueror HTML */
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* 2. Vô hiệu hóa pointer-events để chặn click chuột phải trực tiếp lưu ảnh, click vẫn bubble lên thẻ a */
.gallery-box img,
.mfp-content img,
.mfp-gallery img {
    pointer-events: none;
}

/* 1. Mặc định cho ô date có màu chữ sáng bình thường */
input[type="date"].wpcf7-date,
input[type="date"].wpcf7-date::-webkit-datetime-edit {
    color: rgba(255, 255, 255, 1) !important;
}

/* 2. Khi mang class .is-placeholder (đang hiển thị giá trị mặc định "2000-01-16"), đổi sang màu mờ giống placeholder */
input[type="date"].wpcf7-date.is-placeholder,
input[type="date"].wpcf7-date.is-placeholder::-webkit-datetime-edit {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* ============================================================
   HỆ THỐNG THÍCH, ĐÁNH GIÁ VÀ BÌNH LUẬN (CUSTOM DESIGN)
   ============================================================ */

.vss-comments-wrapper {
    margin: 40px 0;
    font-family: 'Inter', 'Outfit', sans-serif;
    color: #ffffff;
}

/* 1. Thanh Like & Đánh giá (Feedback Bar) */
.vss-feedback-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    gap: 15px;
}

/* Đánh giá sao (Rating) */
.vss-rating-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vss-rating-title {
    font-weight: 500;
    font-size: 16px;
    color: #ffffff;
}

.vss-rating-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vss-star {
    cursor: pointer;
    display: inline-flex;
    transition: transform 0.2s ease, fill 0.2s ease;
}

.vss-star svg {
    fill: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    transition: fill 0.2s ease, filter 0.2s ease;
}

/* Trạng thái hover và active */
.vss-star.hover svg {
    fill: #ffb703;
    filter: drop-shadow(0 0 5px rgba(255, 183, 3, 0.6));
}

.vss-star.active svg {
    fill: #ffb703;
    filter: drop-shadow(0 0 4px rgba(255, 183, 3, 0.5));
}

.vss-rating-container.vss-rated .vss-star {
    cursor: default;
}

.vss-rating-stats {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 5px;
}

/* Thích bài viết (Like) */
.vss-like-container {
    display: flex;
    align-items: center;
}

.vss-like-button {
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.vss-like-button:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.vss-like-button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

/* Trạng thái đã thích (Active) */
.vss-like-button.active {
    color: #EC4521;
}

.vss-like-button.active svg {
    fill: #EC4521;
    stroke: #EC4521;
}

/* Animations */
@keyframes vssPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: vssPulse 0.4s ease-out;
}

@keyframes vssBlink {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.vss-blink {
    animation: vssBlink 0.5s ease-in-out;
}

/* 2. Danh sách bình luận (Comments List) */
.vss-comments-list-container {
    margin-bottom: 40px;
}

.vss-comments-list-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid #EC4521;
    padding-left: 10px;
}

.vss-comment-list-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vss-comment-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vss-comment-item:last-child {
    border-bottom: none;
}

.vss-comment-body {
    display: flex;
    gap: 15px;
}

.vss-comment-avatar img,
.vss-comment-avatar-fallback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.vss-comment-avatar-fallback {
    background: #EC4521;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.vss-comment-meta-wrapper {
    flex: 1;
}

.vss-comment-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.vss-comment-author-name {
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
}

.vss-comment-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.vss-comment-content-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

/* Phân trang bình luận */
.vss-comments-navigation {
    margin-top: 20px;
    padding: 10px 0;
}

.vss-comments-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.vss-comments-navigation a {
    color: #EC4521;
    font-weight: 500;
}

.vss-comments-navigation a:hover {
    color: #ff603b;
}

/* 3. Form gửi bình luận (Comment Form) */
.vss-comment-form-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

.vss-comment-form-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #ffffff;
}

.vss-custom-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vss-form-row input[type="text"],
.vss-form-row textarea {
    width: 100%;
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.vss-form-row input[type="text"]:focus,
.vss-form-row textarea:focus {
    border-color: #EC4521 !important;
    box-shadow: 0 0 0 3px rgba(236, 69, 33, 0.15) !important;
}

/* Nút Submit đỏ bo góc */
.vss-comment-submit-btn {
    align-self: flex-start;
    background: linear-gradient(90deg, #aa080d 0%, #ec1c24 50%, #aa080d 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 10px 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
    height: 46px;
    box-shadow: 0 4px 15px rgba(170, 8, 13, 0.4) !important;
}

.vss-comment-submit-btn:hover {
    background: linear-gradient(90deg, #c40a10 0%, #ff2e37 50%, #c40a10 100%) !important;
    box-shadow: 0 6px 20px rgba(170, 8, 13, 0.6) !important;
    transform: translateY(-1px);
}

.vss-comment-submit-btn:active {
    transform: scale(0.98);
}

.vss-comment-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Loader trong nút Gửi */
.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: vssSpin 0.8s linear infinite;
}

.vss-comment-submit-btn.loading .btn-loader {
    display: inline-block;
}

.vss-comment-submit-btn.loading .btn-text {
    display: none;
}

@keyframes vssSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hộp thông báo AJAX */
.vss-comment-message {
    margin-top: 15px;
}

.vss-msg {
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    animation: vssFadeIn 0.3s ease;
}

.vss-msg.success {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.vss-msg.error {
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

@keyframes vssFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    .vss-feedback-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .vss-like-container {
        width: 100%;
        justify-content: flex-start;
    }
    
    .vss-comment-submit-btn {
        width: 100%;
    }
    
    .vss-comment-form-container {
        padding: 20px;
    }
}

/* ============================================================
   HỆ THỐNG TOAST NOTIFICATION PREMIUM
   ============================================================ */

.vss-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999999;
    pointer-events: none; /* Tránh cản trở click bên dưới container */
}

.vss-toast {
    pointer-events: auto; /* Cho phép click trên từng phần tử toast */
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    animation: vssToastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    backdrop-filter: blur(10px);
}

.vss-toast.success {
    border-left: 4px solid #2ecc71;
}

.vss-toast.warning {
    border-left: 4px solid #ffb703;
}

.vss-toast.error {
    border-left: 4px solid #EC4521;
}

.vss-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vss-toast-icon.success svg { fill: #2ecc71; }
.vss-toast-icon.warning svg { fill: #ffb703; }
.vss-toast-icon.error svg { fill: #EC4521; }

.vss-toast-message {
    line-height: 1.4;
}

@keyframes vssToastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes vssToastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

.vss-toast.fade-out {
    animation: vssToastFadeOut 0.3s ease forwards;
}

/* Responsive Toast */
@media (max-width: 480px) {
    .vss-toast-container {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .vss-toast {
        min-width: 100%;
        padding: 12px 18px;
    }
}

/* ============================================================
   BÌNH LUẬN NHIỀU CẤP (THREADED COMMENTS)
   ============================================================ */

/* Định dạng cấu trúc con thụt lề thụ động */
.vss-comment-list-ul .children {
    list-style: none;
    margin: 0 0 0 45px;
    padding: 0;
    border-left: 2px solid rgba(236, 69, 33, 0.15); /* Đường chỉ đỏ mảnh thanh lịch */
    padding-left: 20px;
}

/* Nút Trả lời dưới mỗi comment */
.vss-comment-reply-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-top: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: color 0.2s ease !important;
    box-shadow: none !important;
}

.vss-comment-reply-btn:hover {
    color: #EC4521 !important;
    background: transparent !important;
}

.vss-comment-reply-btn svg {
    fill: currentColor;
    transition: transform 0.2s ease;
}

.vss-comment-reply-btn:hover svg {
    transform: translateX(-2px);
}

/* Nút Hủy trả lời bên cạnh tiêu đề form */
.vss-cancel-reply-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 4px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-left: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.vss-cancel-reply-btn:hover {
    background: rgba(231, 76, 60, 0.2) !important;
    border-color: rgba(231, 76, 60, 0.4) !important;
    color: #e74c3c !important;
}

/* Kiểu dáng hộp form bình luận khi được di chuyển lồng vào dưới bình luận cha */
.vss-comment-item > .vss-comment-form-container {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(236, 69, 33, 0.25);
    animation: vssFadeIn 0.35s ease;
}

/* Điều chỉnh khoảng cách lề trên Mobile */
@media (max-width: 767px) {
    .vss-comment-list-ul .children {
        margin-left: 20px;
        padding-left: 10px;
    }
}

/* ============================================================
   BỘ ĐẾM KÝ TỰ REAL-TIME PREMIUM (CHARACTER COUNTER)
   ============================================================ */

.vss-textarea-row {
    position: relative !important;
}

.vss-textarea-row textarea {
    padding-bottom: 30px !important; /* Tạo khoảng trống ở dưới để đặt số đếm */
}

.vss-char-counter {
    position: absolute !important;
    right: 15px !important;
    bottom: 10px !important;
    font-size: 11px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    color: rgba(17, 11, 11, 0.4) !important; /* Màu xám mờ trên nền trắng */
    pointer-events: none !important;
    transition: color 0.2s ease !important;
}

.vss-char-counter.max-reached {
    color: #e74c3c !important; /* Đổi sang màu đỏ cảnh báo khi nhập tối đa */
    font-weight: 700 !important;
}