/* ==========================================================================
   K-TECH REVIEWS FRONTEND STYLES - PERFECT SYNCHRONIZED DESIGN SYSTEM
   ========================================================================== */

.ktech-reviews-container {
    width: 100%;
    max-width: 100%;
    margin-top: 30px;
    color: #1e293b;
    background: #FFFFFF;
    border: 1px solid #F5F5F7;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);

    @media only screen and (max-width: 768px) {
        padding: 20px;
    }
}

/* 1. Header Title với vạch màu đỏ nổi bật */
.ktech-reviews-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}
.ktech-reviews-red-line {
    display: inline-block;
    width: 4px;
    height: 22px;
    background-color: #e60012;
    border-radius: 2px;
}
.ktech-reviews-main-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 2. Thẻ Thống kê Điểm số & Tỉ lệ Sao */
.ktech-reviews-stats-card {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 26px 32px;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 30px;
}

.ktech-rs-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #cbd5e1;
    padding-right: 35px;
}
.ktech-rs-score {
    font-size: 52px;
    font-weight: 900;
    color: #e60012;
    line-height: 1;
    margin-bottom: 8px;
}
.ktech-rs-stars {
    display: flex;
    gap: 3px;
    color: #f59e0b;
    font-size: 19px;
    margin-bottom: 8px;
}
.ktech-rs-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.ktech-rs-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ktech-rs-row {
    display: grid;
    grid-template-columns: 55px 1fr 45px;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}
.ktech-rs-progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}
.ktech-rs-progress-fill {
    height: 100%;
    background: #e67e22;
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ktech-rs-percent {
    text-align: right;
    color: #64748b;
    font-size: 12.5px;
}

/* 3. Danh sách Bình luận Khách hàng */
.ktech-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 35px;
}
.ktech-review-item {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 22px;
}
.ktech-review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ktech-ri-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.ktech-ri-author {
    font-size: 15px;
    color: #0f172a;
    font-weight: 700;
}
.ktech-author-title {
    font-weight: 500;
    color: #475569;
}
.ktech-ri-date {
    font-size: 12.5px;
    color: #64748b;
}
.ktech-ri-stars {
    display: flex;
    gap: 3px;
    color: #f59e0b;
    font-size: 15px;
    margin-bottom: 10px;
}
.ktech-star-icon.empty {
    color: #cbd5e1;
}
.ktech-ri-comment {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
}
.ktech-reviews-empty {
    text-align: center;
    padding: 30px 0;
    color: #64748b;
    font-size: 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

/* 4. Form Gửi Đánh giá Đồng Bộ Layout */
.ktech-review-form-card {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 26px 32px;
    margin-top: 10px;
}
.ktech-rfc-title {
    margin: 0 0 20px 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
}
.ktech-rfc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.ktech-rf-input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    color: #0f172a;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.ktech-rf-input:focus,
.ktech-rf-textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ktech-rfc-rating-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ktech-rf-label {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.ktech-star-rating-selector {
    display: flex;
    gap: 6px;
    font-size: 22px;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
}
.ktech-star-rating-selector .star-btn {
    transition: color 0.15s ease, transform 0.15s ease;
}
.ktech-star-rating-selector .star-btn.active,
.ktech-star-rating-selector .star-btn.hover {
    color: #f59e0b;
}
.ktech-star-rating-selector .star-btn:hover {
    transform: scale(1.18);
}

.ktech-rfc-textarea-wrap {
    margin-bottom: 22px;
}
.ktech-rf-textarea {
    width: 100%;
    padding: 14px 16px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    color: #0f172a;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
}

.ktech-rf-submit-btn {
    background: #e60012;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.25);
}
.ktech-rf-submit-btn:hover {
    background: #cc0010;
    box-shadow: 0 6px 16px rgba(230, 0, 18, 0.35);
}
.ktech-rf-submit-btn:active {
    transform: scale(0.98);
}

/* 5. Modal Popup Thông Báo */
.ktech-review-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.ktech-review-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    animation: ktechPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes ktechPopIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.ktech-rm-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.ktech-rm-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}
.ktech-rm-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 24px 0;
}
.ktech-rm-close-btn {
    background: #e60012;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 36px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.ktech-rm-close-btn:hover {
    background: #cc0010;
}

/* Responsive */
@media (max-width: 768px) {
    .ktech-reviews-stats-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    .ktech-rs-left {
        border-right: none;
        border-bottom: 1px solid #cbd5e1;
        padding-right: 0;
        padding-bottom: 20px;
    }
    .ktech-rfc-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   TGDD LAYOUT TEMPLATE 2 STYLES
   ========================================================================== */
.ktech-tgdd-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}
.ktech-tgdd-card-title {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
}
.ktech-tgdd-stats-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: center;
}
.ktech-tgdd-stats-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e2e8f0;
    padding-right: 40px;
}
.ktech-tgdd-score-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #f59e0b;
}
.ktech-tgdd-star-icon {
    font-size: 32px;
    position: relative;
    top: -2px;
}
.ktech-tgdd-score-num {
    font-size: 64px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}
.ktech-tgdd-score-max {
    font-size: 22px;
    color: #94a3b8;
    font-weight: 700;
}
.ktech-tgdd-client-satisfied {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
    margin-top: 10px;
    text-align: center;
}
.ktech-tgdd-stats-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ktech-tgdd-progress-row {
    display: grid;
    grid-template-columns: 14px 14px 1fr 40px;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.ktech-tgdd-star-num {
    text-align: center;
}
.ktech-tgdd-star-symbol {
    color: #f59e0b;
    font-size: 13px;
}
.ktech-tgdd-bar-bg {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.ktech-tgdd-bar-fill {
    height: 100%;
    background: var(--ktech-primary-color, #e60012);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}
.ktech-tgdd-percent-num {
    text-align: right;
    color: #64748b;
}

.ktech-tgdd-write-btn {
    background: var(--ktech-primary-color, #e60012);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 48px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 15px rgba(230,0,18,0.2);
    display: inline-block;
}
.ktech-tgdd-write-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,0,18,0.3);
}
.ktech-tgdd-write-btn:active {
    transform: translateY(0);
}

/* TGDD POPUP MODAL */
.ktech-tgdd-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: ktechPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}
.ktech-tgdd-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}
.ktech-tgdd-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}
.ktech-tgdd-modal-close-btn {
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    margin: 0;
}
.ktech-tgdd-modal-close-btn:hover {
    color: #0f172a;
}

.ktech-tgdd-modal-body {
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}
.ktech-tgdd-modal-product {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.ktech-tgdd-modal-product-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}
.ktech-tgdd-modal-product-title {
    font-size: 15px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.4;
}

/* Big Rating Stars */
.ktech-tgdd-stars-picker {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}
.ktech-tgdd-stars-picker .ktech-star-rating-selector {
    gap: 16px;
}
.ktech-tgdd-stars-picker .star-btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.ktech-tgdd-stars-picker .star-btn {
    font-size: 32px;
    color: #e2e8f0;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}
.ktech-tgdd-stars-picker .star-btn-wrap:hover .star-btn {
    transform: scale(1.15);
}
.ktech-tgdd-stars-picker .star-btn.active,
.ktech-tgdd-stars-picker .star-btn.hover {
    color: #f59e0b;
}
.ktech-tgdd-stars-picker .star-txt {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}
.ktech-tgdd-stars-picker .star-btn-wrap:hover .star-txt,
.ktech-tgdd-stars-picker .star-btn.active + .star-txt {
    color: #f59e0b;
}

.ktech-tgdd-input-wrap {
    margin-bottom: 16px;
}
.ktech-tgdd-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px;
    font-size: 14px;
    color: #0f172a;
    box-sizing: border-box;
    resize: vertical;
}
.ktech-tgdd-textarea:focus {
    outline: none;
    border-color: var(--ktech-primary-color, #e60012);
    box-shadow: 0 0 0 3px rgba(230,0,18,0.1);
}

.ktech-tgdd-checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.ktech-tgdd-cb-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}
.ktech-tgdd-cb {
    width: 16px;
    height: 16px;
    margin-top: 2px !important;
}

.ktech-tgdd-upload-row {
    margin-bottom: 20px;
}
.ktech-tgdd-upload-btn {
    border: 1px solid #2563eb;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}
.ktech-tgdd-upload-btn:hover {
    background: #dbeafe;
}
.ktech-tgdd-preview-images-container {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.ktech-tgdd-preview-img-wrap {
    position: relative;
    width: 70px;
    height: 70px;
}
.ktech-tgdd-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}
.ktech-tgdd-remove-preview-img {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    border: none;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.ktech-tgdd-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.ktech-tgdd-input {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 13.5px;
    box-sizing: border-box;
}
.ktech-tgdd-input:focus {
    outline: none;
    border-color: var(--ktech-primary-color, #e60012);
    box-shadow: 0 0 0 3px rgba(230,0,18,0.1);
}

.ktech-tgdd-submit-btn {
    width: 100%;
    height: 48px;
    background: var(--ktech-primary-color, #e60012);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 15px;
    transition: opacity 0.2s;
}
.ktech-tgdd-submit-btn:hover {
    opacity: 0.9;
}
.ktech-tgdd-modal-footer-links {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #64748b;
}
.ktech-tgdd-modal-footer-links a {
    color: #64748b;
    text-decoration: none;
    margin: 0 4px;
}

.ktech-rf-submit-btn {
    margin: 0;
}




/* Responsive cho TGDD */
@media (max-width: 768px) {
    .ktech-tgdd-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ktech-tgdd-stats-left {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 20px;
    }
    .ktech-tgdd-input-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ktech-rf-submit-btn {
        width: 100%;
    }
}

