/* TMT – Giao diện các form báo giá (popup, form nhúng, form Xem nhanh). Nạp bằng wp_enqueue_style. */

/* ---------- Popup báo giá ---------- */
#tmt-quote-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(42, 26, 18, 0.55);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#tmt-quote-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.tmt-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: tmtModalSlide 0.35s ease forwards;
    font-family: inherit;
}
@keyframes tmtModalSlide {
    from { transform: translateY(30px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.tmt-modal-header {
    background: #ffedd5; /* cùng màu nền footer */
    color: #2a1a12;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #ff6600;
}
.tmt-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tmt-logo-badge {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}
/* logo PNG gốc, giữ nguyên màu, nền trong suốt */
.tmt-logo-badge img { display: block; height: 34px; width: auto; }
@media (max-width: 549px) { .tmt-logo-badge img { height: 26px; } }
.tmt-header-title {
    font-size: 17px;
    font-weight: 800;
    color: #2a1a12;
    margin: 0;
    line-height: 1.2;
}
.tmt-header-sub {
    font-size: 12px;
    color: #6b5b4e;
    margin: 3px 0 0;
}
.tmt-modal-close {
    background: rgba(154, 52, 18, 0.08);
    border: none;
    color: #9a3412;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.tmt-modal-close:hover {
    background: #ff6600;
    color: #fff;
}
.tmt-modal-body {
    padding: 22px 24px;
    max-height: 80vh;
    overflow-y: auto;
}
.tmt-form-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2a1a12;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}
.tmt-select, .tmt-input, .tmt-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #fbd5b5;
    border-radius: 6px;
    font-size: 13.5px;
    box-sizing: border-box;
    margin-bottom: 8px;
    background: #fff;
    color: #2a1a12;
}
.tmt-select, .tmt-input {
    height: auto !important;
    min-height: 44px;
    line-height: 1.5 !important;
    padding: 10px 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tmt-select { padding-right: 36px !important; }
.tmt-select:focus, .tmt-input:focus, .tmt-textarea:focus {
    border-color: #ff6600;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,102,0,0.15);
}
.tmt-model-preview {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    color: #92400e;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}
.tmt-model-preview strong {
    color: #b45309;
}
.tmt-addon-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #fff7ed;
    border: 1px solid #fde2cc;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #5c4a3d;
    cursor: pointer;
}
.tmt-addon-item input[type="checkbox"] {
    accent-color: #ff6600;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.tmt-form-row {
    display: flex;
    gap: 10px;
}
.tmt-form-row > div {
    flex: 1;
}
.tmt-submit-btn {
    width: 100%;
    background: #ff6600;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.35);
    transition: all 0.2s;
    margin-top: 10px;
}
.tmt-submit-btn:hover {
    background: #e65c00;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.45);
}
.tmt-security-note {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
}
.tmt-show-sm { display: none; }
.tmt-result-msg {
    display: none;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    margin-top: 12px;
}
.tmt-result-msg.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.tmt-result-msg.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
/* Điện thoại: popup vừa màn hình, header gọn, ô nhập 1 cột */
@media (max-width: 549px) {
    #tmt-quote-modal-overlay { align-items: flex-start; padding: 10px; }
    .tmt-modal-box { display: flex; flex-direction: column; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 12px; }
    .tmt-modal-header { position: relative; flex-shrink: 0; padding: 12px 14px; }
    .tmt-header-left { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 40px; }
    .tmt-logo-badge img { height: 24px; }
    .tmt-header-title { font-size: 15.5px; line-height: 1.25; }
    .tmt-header-sub { font-size: 11.5px; line-height: 1.4; }
    .tmt-modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; min-height: 0; padding: 0; margin: 0; line-height: 1; font-size: 18px; }
    .tmt-modal-body { flex: 1 1 auto; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 16px; }
    .tmt-form-section-title { font-size: 12px; margin-bottom: 8px; }
    .tmt-form-row { flex-direction: column; gap: 0; }
    .tmt-select, .tmt-input, .tmt-textarea { font-size: 16px; }
    .tmt-select, .tmt-input { min-height: 46px; }
    .tmt-textarea { min-height: 76px; }
    .tmt-model-preview { flex-direction: column; gap: 2px; font-size: 12.5px; margin-bottom: 12px; }
    .tmt-submit-btn { font-size: 14px; padding: 13px 12px; line-height: 1.3; letter-spacing: .2px; }
    .tmt-hide-sm { display: none; }
    .tmt-show-sm { display: inline; }
    .tmt-security-note { font-size: 11.5px; }
}

/* ---------- Cửa sổ Xem nhanh sản phẩm (Quick View) ---------- */
.product-lightbox.lightbox-content { max-width: 920px !important; padding: 0 !important; border-radius: 14px; overflow: hidden; background: #fff; }
.product-lightbox .mfp-close { color: #ffffff !important; opacity: 1; top: 14px; right: 14px; }
.product-lightbox .mfp-close:hover { color: #ff6600 !important; }
.tmt-qv { color: #2a1a12; }
.tmt-qv-header { background: linear-gradient(90deg,#ff6a13,#ff8a3d); padding: 18px 60px 18px 26px; display: flex; align-items: center; gap: 22px; }
.tmt-qv-badge { background: #9a3412; color: #fff; font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 5px; letter-spacing: .5px; white-space: nowrap; }
.tmt-qv-title { color: #fff !important; font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: .5px; }
.tmt-qv-body { display: flex; gap: 24px; padding: 24px 26px; }
.tmt-qv-left { flex: 0 0 38%; }
.tmt-qv-right { flex: 1; min-width: 0; }
.tmt-qv-image { position: relative; border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.tmt-qv-image img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.tmt-qv-caption { position: absolute; left: 10px; bottom: 10px; background: rgba(154,52,18,.9); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 6px; }
.tmt-qv-usage { margin-top: 16px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 14px 16px; }
.tmt-qv-usage strong { color: #c2410c; font-size: 13.5px; letter-spacing: .3px; }
.tmt-qv-usage p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: #5c4a3d; }
.tmt-qv-spec-title { font-size: 14px; font-weight: 700; letter-spacing: .6px; margin: 0 0 10px; color: #2a1a12; }
.tmt-qv-specs { width: 100%; border: 1px solid #fde2cc; border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; margin: 0; }
.tmt-qv-specs th, .tmt-qv-specs td { padding: 10px 12px !important; border: 0 !important; border-bottom: 1px solid #fde2cc !important; font-size: 14px; vertical-align: top; text-transform: none; letter-spacing: 0; }
.tmt-qv-specs tr:last-child th, .tmt-qv-specs tr:last-child td { border-bottom: 0 !important; }
.tmt-qv-specs th { width: 42%; font-weight: 400; color: #6b5b4e; background: #fff7ed; text-align: left; }
.tmt-qv-specs td { font-weight: 600; color: #2a1a12; }
.tmt-qv-specs tr.is-speed td { color: #ea580c; }
.tmt-qv-specs tr.is-accuracy td { color: #16a34a; }
.tmt-qv-more { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: #ff6600; }
.tmt-qv-nospec { color: #6b5b4e; }
.tmt-qv-quote { background: #fff7ed; border: 1px solid #fde2cc; margin: 0 26px 26px; border-radius: 12px; padding: 20px 22px; }
.tmt-qv-quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.tmt-qv-quote h4 { color: #2a1a12; font-size: 16px; font-weight: 800; margin: 0 0 3px; }
.tmt-qv-quote p { color: #6b5b4e; font-size: 13px; margin: 0; }
.tmt-qv-hotline { color: #ff6600 !important; font-weight: 700; font-size: 14px; white-space: nowrap; }
.tmt-qv-form { display: flex; gap: 10px; margin: 0; }
.tmt-qv-form input { flex: 1; margin: 0 !important; height: 46px; background: #fff !important; border: 1px solid #fde2cc !important; color: #2a1a12 !important; border-radius: 8px !important; padding: 0 14px !important; box-shadow: none !important; }
.tmt-qv-form input::placeholder { color: #a8978a; }
.tmt-qv-form button { flex: 1; margin: 0; height: 46px; background: #ea580c; color: #fff; border: 0; border-radius: 8px; font-weight: 800; letter-spacing: .5px; cursor: pointer; }
.tmt-qv-form button:hover { background: #c2410c; }
.tmt-qv-form button:disabled { opacity: .7; }
.tmt-qv-msg { display: none; margin-top: 10px; padding: 9px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; text-align: center; }
.tmt-qv-msg.success { display: block; background: #dcfce7; color: #166534; }
.tmt-qv-msg.error { display: block; background: #fee2e2; color: #991b1b; }
@media (max-width: 767px) {
    .tmt-qv-header { padding: 14px 50px 14px 16px; gap: 12px; }
    .tmt-qv-title { font-size: 24px; }
    .tmt-qv-body { flex-direction: column; padding: 16px; gap: 16px; }
    .tmt-qv-quote { margin: 0 16px 16px; padding: 16px; }
    .tmt-qv-quote-head { flex-direction: column; }
    .tmt-qv-form { flex-direction: column; }
    .tmt-qv-form input, .tmt-qv-form button { flex: none; }
}

/* ---------- Form nhúng [tmt_form] (cuối trang, Liên hệ) ---------- */
.tmt-qf { background: #fff; border: 1px solid #fde2cc; border-radius: 12px; padding: 28px; box-shadow: 0 4px 18px rgba(154,52,18,.08); }
.tmt-qf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tmt-qf-full { grid-column: 1 / -1; }
.tmt-qf label { display: block; font-size: 13px; font-weight: 600; color: #5c4a3d; margin-bottom: 6px; }
.tmt-qf input, .tmt-qf select, .tmt-qf textarea { width: 100%; margin: 0 !important; height: auto !important; min-height: 46px; line-height: 1.5 !important; padding: 11px 14px !important; border: 1px solid #fbd5b5 !important; border-radius: 8px !important; background-color: #fffaf5 !important; font-size: 14.5px; color: #2a1a12; box-shadow: none !important; }
.tmt-qf select { padding-right: 36px !important; text-overflow: ellipsis; }
.tmt-qf textarea { min-height: 80px; resize: vertical; }
.tmt-qf input:focus, .tmt-qf select:focus, .tmt-qf textarea:focus { border-color: #ff6600 !important; background-color: #fff !important; outline: none; box-shadow: 0 0 0 3px rgba(255,102,0,.15) !important; }
.tmt-qf button { width: 100%; margin: 4px 0 0; height: auto; min-height: 52px; padding: 12px 16px; line-height: 1.3; background: #ff6600; color: #fff; border: 0; border-radius: 8px; font-size: 15.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 12px rgba(255,102,0,.3); }
.tmt-qf button:hover { background: #e65c00; }
.tmt-qf button:disabled { opacity: .7; }
.tmt-qf-note { text-align: center; font-size: 12.5px; color: #64748b; margin: 10px 0 0; }
.dark .tmt-qf, .tmt-qf { color: #5c4a3d; }
.tmt-qf label { color: #5c4a3d !important; }
.tmt-qf .tmt-qf-note { color: #64748b !important; }
.tmt-qf input, .tmt-qf select, .tmt-qf textarea { color: #2a1a12 !important; }
.tmt-qf input::placeholder, .tmt-qf textarea::placeholder { color: #a8978a !important; }
.tmt-qf-msg { display: none; margin-top: 10px; padding: 10px; border-radius: 6px; font-weight: 600; font-size: 14px; text-align: center; }
.tmt-qf-msg.success { display: block; background: #dcfce7; color: #166534; }
.tmt-qf-msg.error { display: block; background: #fee2e2; color: #991b1b; }
@media (max-width: 549px) { .tmt-qf { padding: 20px 16px; } .tmt-qf-grid { grid-template-columns: 1fr; } }
/* Điện thoại: form trong thẻ .tmt-dq-quote-card (khối Đặc quyền, cuối trang chủ / giới thiệu) bỏ lớp khung lồng, form rộng gần hết màn hình */
@media (max-width: 549px) {
    .tmt-qf input, .tmt-qf select, .tmt-qf textarea { font-size: 16px; }
    .tmt-qf-grid { gap: 12px; }
    .tmt-qf button { margin-top: 8px; font-size: 15px; }
    .tmt-dq-quote-row { padding: 0 !important; margin-top: 18px !important; }
    .tmt-dq-quote-card { padding: 0 12px !important; }
    .tmt-dq-quote-card > .col-inner { padding: 24px 16px 20px !important; border-radius: 14px !important; }
    .tmt-dq-quote-head p { margin-bottom: 18px !important; }
    .tmt-dq-quote-head h3 { font-size: 19px !important; line-height: 1.35 !important; }
    .tmt-dq-quote-card .tmt-qf { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
}

/* Tiêu đề / mô tả riêng của form nhúng (nếu nhập trong cấu hình form) */
.tmt-qf-head { text-align: center; margin-bottom: 18px; }
.tmt-qf-head h3 { font-size: 22px; font-weight: 800; color: #2a1a12; text-transform: uppercase; margin: 0 0 6px; }
.tmt-qf-head p { font-size: 14px; color: #7a6a5e; margin: 0; }
