/* TFC Quote System — Product Catalog Styles */

/* FORMICABLE CSS */
.with_frm_style .frm-show-form div.frm_description p {
    font-size: 24px !important;
    xmargin-bottom: 25px;
}

.frm_forms * {
    color: #000 !important;
    font-size: 18px !important;
}
.frm_forms .frm_checkbox {
    margin-bottom:2px;
    margin-left:10px;
}

.frm_forms .frm_primary_label {
    padding:20px 0 10px;
}

.form-field {
    margin-bottom:10px !important;
}

.frm_flex button {
	color:white !important;
}

.frm_flex button:hover {
	color:black !important;
}

/* ========================================
   CSS ISOLATION — Override Elementor/Theme
   ======================================== */
.tfc-catalog-wrap,
.tfc-cart-summary {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333 !important;
    box-sizing: border-box !important;
}
#tfc-category-list { margin-left: 10px; max-height: 400px; overflow-y: auto; padding-right: 6px; }
.tfc-catalog-wrap .tfc-cat-hidden { display: none !important; }
.tfc-catalog-wrap *,
.tfc-cart-summary * {
    box-sizing: border-box !important;
}
.tfc-catalog-wrap table,
.tfc-cart-summary table {
    border: none !important;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    width: 100% !important;
}
.tfc-catalog-wrap th,
.tfc-cart-summary th {
    border: none !important;
    text-align: left !important;
    font-weight: 600 !important;
}
.tfc-catalog-wrap td,
.tfc-cart-summary td {
    border: none !important;
    border-bottom: 1px solid #ccc !important;
}
.tfc-catalog-wrap tr,
.tfc-cart-summary tr {
    border: none !important;
}
.tfc-catalog-wrap thead tr,
.tfc-cart-summary thead tr {
    background: #1a3a6b !important;
}
.tfc-catalog-wrap thead tr:hover,
.tfc-cart-summary thead tr:hover {
    background: #1a3a6b !important;
}
.tfc-catalog-wrap a {
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
     font-size: 18px;
	    font-weight: bold !important;
}
.tfc-catalog-wrap input[type="text"],
.tfc-catalog-wrap input[type="search"] {
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #fff !important;
    color: #333 !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
}
.tfc-catalog-wrap input[type="text"]:focus,
.tfc-catalog-wrap input[type="search"]:focus {
    border-color: #1a3a6b !important;
    box-shadow: 0 0 0 1px #1a3a6b !important;
    outline: none !important;
}
.tfc-catalog-wrap input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 4px 0 0 !important;
    vertical-align: middle !important;
}
.tfc-catalog-wrap button {
    font-family: inherit !important;
    cursor: pointer !important;
}
.tfc-catalog-wrap label {
    font-weight: normal !important;
    margin: 0 !important;
    display: block !important;
}
.tfc-catalog-wrap h2,
.tfc-catalog-wrap h3,
.tfc-catalog-wrap h4 {
    font-family: inherit !important;
    margin-top: 0 !important;
    padding: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}
.tfc-catalog-wrap p {
    margin-bottom: 10px !important;
}
.tfc-catalog-wrap img {
    max-width: 100% !important;
    height: auto !important;
    box-shadow: none !important;
    border: none !important;
}

/* ========================================
   END CSS ISOLATION
   ======================================== */

img.wp-smiley, img.emoji { height: 1.5em !important; width:1.5em !important; }
.tfc-catalog-wrap { margin: 0 auto; }
.tfc-catalog-header { display:none; text-align: center; margin-bottom: 30px; }
.tfc-catalog-header h2 { color: #1a3a6b; font-size: 28px; }
.tfc-catalog-top-actions { display: flex; justify-content: flex-end; gap: 30px; margin-bottom: 20px; align-items: center; }
.tfc-catalog-top-actions div { max-width: 380px; }
.tfc-catalog-top-actions div:first-child { text-align: right; }
.tfc-view-quote-btn { background: #7DA830; color: #fff; padding: 12px 26px; text-decoration: none; border-radius: 4px; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; }
.tfc-catalog-top-actions div:last-child { text-align: right; }
.tfc-view-quote-btn:hover { background: #65960c; color: #fff; }
.tfc-quote-count {  display:none !important; background: #fff; color: #000; border-radius: 50%; width: 30px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px;}
.tfc-view-quote-btn.tfc-choose-state { cursor: default; }
.tfc-view-quote-btn { transition: opacity 0.4s ease-in-out; }
.tfc-remove-all { color: #f00; cursor: pointer; font-size: 17px; font-weight: 500; transition: opacity 0.4s ease-in-out; }
.tfc-remove-all:hover {  }
.tfc-catalog-layout { display: flex; gap: 25px; }
.tfc-sidebar { width: 200px; flex-shrink: 0; }
.tfc-search-field { position: relative; margin-bottom: 8px; }
.tfc-search-field input[type="text"] { width: 100%; padding: 10px 48px 10px 10px; border: 1px solid #1a3a6b !important; border-radius: 0px !important; box-sizing: border-box; margin-bottom: 0 !important; font-size: 14px; background: #f0f4fa !important; box-shadow: none !important; }
.tfc-search-field input[type="text"]:focus { outline: none !important; border-color: #1a3a6b !important; background: #fff !important; box-shadow: 0 0 0 3px rgba(26,58,107,0.2) !important; }
.tfc-search-icon { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 38px; display: flex; align-items: center; justify-content: center; background: #1a3a6b; border-radius: 0; pointer-events: none; }
.tfc-search-icon svg { width: 20px; height: 20px; stroke: #fff; }
.tfc-upload-date { font-size: 10px; color: #999; text-align: right; margin-bottom: 4px; margin-top: -2px; }
.tfc-sidebar input[type="text"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 12px; box-sizing: border-box; }
.tfc-results-count { font-size: 14px; color: #111; margin-bottom: 14px; font-weight: 600; }
.tfc-clear-filters { display: none; font-size: 15px; color: #f00; text-transform:uppercase; cursor: pointer; margin-bottom: 15px; border: none; background: none; padding: 0; font-family: inherit; }
.tfc-clear-filters:hover { text-decoration: none; }
.tfc-clear-filters.visible { display: block; background:#65960C !important; padding:10px !important; color: white !important;}
.tfc-category-filter h4 { margin: 0 0 10px; font-size: 15px; color: #333; }
.tfc-cat-parent { margin-bottom: 5px; }
.tfc-cat-parent-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; padding: 4px 0; }
.tfc-cat-children { padding-left: 22px; display: none; }
.tfc-cat-children.open { display: block; }
.tfc-cat-children label { display: block; padding: 3px 0; font-weight: normal; cursor: pointer; }
.tfc-table-wrap { flex: 1; min-width: 0; }
.tfc-product-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.tfc-product-table th { background: #65960C !important; color: #fff !important; padding: 10px 8px !important; text-align: left !important; font-size: 13px !important; text-transform: uppercase !important; border: none !important; border-right: 1px solid #2a4a7b !important; }
.tfc-product-table th:last-child { border-right: none !important; }
.tfc-product-table th:last-child { text-align: center !important; }
.tfc-product-table td, .tfc-cart-table td { padding: 10px 8px !important; border-bottom: 1px solid #ccc !important; border-right: 1px solid #e8e8e8 !important; font-size: 14px !important; vertical-align: top !important; }
.tfc-product-table td:last-child, .tfc-cart-table td:last-child { border-right: none !important; }
.tfc-product-table td:last-child { text-align: center !important; }
.tfc-product-table tbody tr:nth-child(odd) { background: #fff !important; }
.tfc-product-table tbody tr:nth-child(even) { background: #f5f5f5 !important; }
.tfc-cat-cell .tfc-cat-parent-name { display: block; font-weight: 500; }
.tfc-cat-cell .tfc-cat-child-name { display: block; color: #c0392b; font-size: 13px; }
.tfc-add-btn { background: #65960C !important; color: #fff !important; border: none !important; border-radius: 50% !important; width: 32px !important; height: 32px !important; font-size: 22px !important; font-weight: 300 !important; cursor: pointer !important; display: grid !important; place-items: center !important; padding: 0 1px 5px 0 !important; margin: 0 auto !important; font-family: Arial, Helvetica, sans-serif !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important; box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important; text-decoration: none !important; outline: none !important; }
.tfc-add-btn:hover { background: #219a52 !important; }
.tfc-add-btn.added { background: #e74c3c !important; }

table.tfc-product-table {
  table-layout: fixed;
  width: 100%;
}

table.tfc-product-table th:nth-child(1) { width: 17%; }
table.tfc-product-table th:nth-child(2) { width: 29%; }
table.tfc-product-table th:nth-child(3) { width: 32%; }
table.tfc-product-table th:nth-child(4) { width: 12%; }
table.tfc-product-table th:nth-child(5) { width: 10%; }

/* Selections accordion */
.tfc-selections-accordion { border-radius: 5px 5px 0 0; overflow: hidden; height: 0; opacity: 0; margin-bottom: 0; transition: height 0.6s ease-in-out, opacity 0.5s ease-in-out, margin-bottom 0.6s ease-in-out; }
.tfc-selections-accordion.tfc-accordion-visible { opacity: 1; }
.tfc-selections-header { background: #FDC20C !important; color: #fff !important; padding: 10px 16px !important; cursor: pointer !important; font-weight: 600 !important; font-size: 14px !important; display: flex !important; align-items: center !important; user-select: none !important; border: none !important; color:#000;}
.tfc-selections-header:hover { background: #153058; }
.tfc-selections-header > span:first-child { flex: 1; text-align: right;    margin-right: 20px;  color:#000;}
.tfc-selections-count-wrap { text-transform: lowercase; font-weight: 400;   color:#000;}
.tfc-selections-toggle-text { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; flex-shrink: 0;  color:#000; }
.tfc-selections-arrow { font-size: 14px; color: #000; }
.tfc-selections-body { background: #f8f9fc; }
.tfc-selections-table { width: 100%; border-collapse: collapse; margin: 0; }
.tfc-selection-row td { border-bottom: 1px solid #d0d8e4 !important; }
.tfc-selection-row.tfc-row-fade-in { animation: tfcRowFadeIn 0.5s ease-in-out; }
@keyframes tfcRowFadeIn {
    from { opacity: 0; background: #d4edda; }
    to { opacity: 1; }
}

.tfc-pagination { margin-top: 20px; display: flex; gap: 5px; justify-content: center; align-items: center; flex-wrap: wrap; }
.tfc-pagination a, .tfc-pagination span { padding: 8px 14px; border: 1px solid #ddd; text-decoration: none; color: #333; border-radius: 3px; font-size: 14px; }
.tfc-pagination span.current { background: #1a3a6b; color: #fff; border-color: #1a3a6b; }
.tfc-pagination a:hover { background: #f0f0f0; }
.tfc-pagination .tfc-page-ellipsis { border: none; padding: 8px 6px; color: #999; font-size: 16px; }
.tfc-instructions { font-size: 20px; color: #000; margin-bottom: 5px; }

/* Brand logos layout */
.tfc-brands-layout { display: flex; gap: 30px; margin-bottom: 50px; align-items: center; }
.tfc-brands-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; flex: 1; margin-top:-33px; }
.tfc-brand-card { border: 1px solid #ddd; border-radius: 6px; padding: 10px; text-align: center; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100px; background: #fff;    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.18); }
.tfc-brand-card:hover { border-color: #e74c3c; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.tfc-brand-card.active { border-color: #e74c3c; border-width: 2px; box-shadow: 0 2px 8px rgba(26,58,107,0.2); }
.tfc-brand-card img { max-width: 140px; max-height: 60px; object-fit: contain; margin-bottom: 8px;border-radius: 0 !important; }
.tfc-brand-card-name { font-size: 12px; font-weight: 700; color: #333; text-transform: uppercase; line-height: 1.3; }
@keyframes tfc-slide-out-up { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(-18px); } }
@keyframes tfc-slide-in-down { from { opacity:0; transform:translateY(-18px); } to { opacity:1; transform:translateY(0); } }
.tfc-brand-slide-out { animation: tfc-slide-out-up 0.22s ease forwards; }
.tfc-brand-slide-in  { animation: tfc-slide-in-down 0.25s ease forwards; }
.tfc-brand-view-toggle { width: 100%; margin-top: auto; margin-bottom: 20px; }
.tfc-brand-toggle-btn { font-weight:bold !important; background: #F47121 !important; border: none; color: #fff !important; font-size: 16px; font-weight: 700; padding: 10px 16px !important; border-radius: 6px; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tfc-brand-toggle-btn:hover { background: #F47121 !important; }
.tfc-toggle-arrow { font-size: 46px; line-height: 1; display: flex; align-items: center; margin-bottom: 10px; }
.tfc-brand-list-view { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px 16px; margin: 0; padding: 14px 20px 0; list-style: none; align-self: flex-start; max-height: 400px; overflow-y: auto; align-content: start; }
.tfc-brand-list-item { cursor: pointer; padding: 4px 0; font-size: 14px; font-weight: 600; color: #333; text-transform: uppercase; break-inside: avoid; }
.tfc-brand-list-item:hover { color: #e74c3c; }
.tfc-brand-list-item::after { content: ''; opacity: 0; transition: opacity 0.15s ease, transform 0.15s ease; transform: translateX(-4px); display: inline-block; margin-left: 6px; }
.tfc-brand-list-item:hover::after { content: '→'; opacity: 1; transform: translateX(0); }
.tfc-brand-list-item.active { color: #e74c3c; text-decoration: underline; }
.tfc-brands-sidebar { width: 320px; flex-shrink: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; text-align: center; padding-top: 20px; margin-left: auto; }
.tfc-brands-sidebar .tfc-view-quote-btn { width: 100%; justify-content: center; padding: 6px 24px; font-size: 20px; border-radius: 30px 0 30px; box-shadow: 1px 1px 8px -4px black; }
.tfc-brands-sidebar .tfc-instructions { font-size: 16px; font-weight:500; }
.tfc-brands-sidebar .tfc-add-btn-demo { background: #27ae60; color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 18px; display: inline-grid; place-items: center; vertical-align: middle; font-family: Arial, Helvetica, sans-serif; }

/* Admin inline editing */
#tfc-admin-toolbar { text-align: right; margin-bottom: 10px; }
.tfc-add-product-btn { background: #1a3a6b; color: #fff; border: none; border-radius: 4px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; letter-spacing: 0.3px; }
.tfc-add-product-btn:hover { background: #153058; }
.tfc-edit-btn { background: #888 !important; color: #fff !important; border: none !important; border-radius: 50% !important; width: 27px !important; height: 27px !important; font-size: 15px !important; font-weight: normal !important; cursor: pointer !important; display: grid !important; place-items: center !important; padding: 0 !important; margin: 0 auto !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important; box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important; margin-bottom:4px !important; }
.tfc-edit-btn:hover { background: #555 !important; }
.tfc-row-editing td { background: #fffde7 !important; }
.tfc-inline-input { width: 100% !important; box-sizing: border-box !important; padding: 4px 6px !important; border: 1px solid #aaa !important; border-radius: 3px !important; font-size: 13px !important; font-family: inherit !important; background: #fff !important; color: #333 !important; box-shadow: none !important; outline: none !important; display: block !important; }
.tfc-inline-input:focus { border-color: #555 !important; }
.tfc-save-btn { background: #27ae60 !important; color: #fff !important; border: none !important; border-radius: 50% !important; width: 27px !important; height: 27px !important; font-size: 18px !important; font-weight: 300 !important; cursor: pointer !important; display: grid !important; place-items: center !important; padding: 0 !important; margin: 0 auto 5px !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important; box-shadow: none !important; }
.tfc-save-btn:hover { background: #219a52 !important; }
.tfc-save-btn:disabled { opacity: 0.6 !important; cursor: default !important; }
.tfc-cancel-btn { background: #e74c3c !important; color: #fff !important; border: none !important; border-radius: 50% !important; width: 27px !important; height: 27px !important; font-size: 18px !important; font-weight: 300 !important; cursor: pointer !important; display: grid !important; place-items: center !important; padding: 0 !important; margin: 0 auto !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important; box-shadow: none !important; }
.tfc-cancel-btn:hover { background: #c0392b !important; }
.tfc-delete-btn { background: #c0392b !important; color: #fff !important; border: none !important; border-radius: 50% !important; width: 27px !important; height: 27px !important; font-size: 20px !important; cursor: pointer !important; display: grid !important; place-items: center !important; padding: 0 0 5px !important; margin: 0 auto !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important; box-shadow: none !important; }
.tfc-delete-btn:hover { background: #a93226 !important; }
.tfc-delete-btn:disabled { opacity: 0.6 !important; cursor: default !important; }

/* Submit Quote page styles */
.tfc-cart-summary { margin: 20px 0; }
.tfc-cart-summary h3 { color: #1a3a6b; margin-bottom: 15px; }
.tfc-cart-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.tfc-cart-table th { background: #65960c !important; color: #fff !important; padding: 10px 12px !important; text-align: left !important; font-size: 13px !important; text-transform: uppercase !important; border: none !important; border-right: 1px solid #2a4a7b !important; }
.tfc-cart-table th:last-child { border-right: none !important; }
.tfc-cart-table th:last-child { text-align:center !important; } 
.tfc-cart-table td:last-child { text-align:center !important; } 
.tfc-cart-table td { padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 14px; }
.tfc-cart-remove {
    background: #e74c3c !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 1px 0px 0 !important;
    margin: 0 auto !important;
    font-family: Arial, Helvetica, sans-serif !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    outline: none !important;
    
}
.tfc-cart-remove:hover { color: #e74c3c; }
.tfc-empty-cart { text-align: center; padding: 30px; color: #000; font-size: 20px; }
.tfc-add-items-btn { display: inline-flex; align-items: center; gap: 10px; background: #c0392b; color: #fff !important; padding: 14px 28px; text-decoration: none !important; border-radius: 4px; font-weight: 700 !important; font-size: 18px !important; margin-bottom: 20px; line-height: 1; border-radius: 30px 0 !important;}
.tfc-add-items-btn span { font-size: 50px !important; line-height: 1; margin: 0 !important; margin-top: -9px !important; }
.tfc-add-items-btn:hover { background: #a93226; color: #fff !important; }
.tfc-cat-parent-name-cell { display: block; font-weight: 500; }
.tfc-cat-child-name-cell { display: block; color: #c0392b; font-size: 13px; }

/* ========================================
   MOBILE RESPONSIVE — 768px and below
   ======================================== */
@media screen and (max-width: 768px) {

    /* Top actions: stack vertically, center */
    .tfc-catalog-top-actions {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }

    /* Brand logos layout: stack vertically */
    .tfc-brands-layout {
        flex-direction: column;
        gap: 20px;
    }
    .tfc-brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        max-width: 600px;
        margin: 0 auto;
    }
    .tfc-brands-sidebar {
        width: 100%;
        min-height: auto;
        padding-top: 10px;
    }
    .tfc-brand-list-view { text-align: center; }
    .tfc-brand-toggle-btn { width: 100%; }
    .tfc-brands-sidebar .tfc-view-quote-btn {
        width: auto;
        font-size: 16px;
        padding: 14px 24px;
    }

    /* Sidebar + table: stack vertically */
    .tfc-catalog-layout {
        flex-direction: column;
        gap: 15px;
    }
    .tfc-sidebar {
        width: 100%;
    }

    /* Category filter: scrollable container */
    .tfc-category-filter {
        max-height: 200px;
        overflow-y: auto;
        border: 1px solid #eee;
        border-radius: 4px;
        padding: 8px;
    }

    /* Table: horizontal scroll */
    .tfc-table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tfc-product-table {
        min-width: 600px;
    }

    /* Selections accordion */
    .tfc-selections-header {
        padding: 10px 12px;
        font-size: 13px;
    }
    .tfc-selections-table {
        min-width: 600px;
    }

    /* Pagination: touch-friendly */
    .tfc-pagination a, .tfc-pagination span {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 40px;
        text-align: center;
    }

    /* Submit button: keep natural size */
    .tfc-view-quote-btn {
        box-sizing: border-box;
    }

    /* Remove all: center */
    .tfc-remove-all {
        text-align: center;
        display: block;
    }

    /* Instructions text: center */
    .tfc-instructions {
        text-align: center;
        font-size: 14px;
    }

    /* Prevent iOS zoom on input focus */
    .tfc-search-field input[type="text"] {
        font-size: 16px;
    }
}

/* ========================================
   SMALL MOBILE — 480px and below
   ======================================== */
@media screen and (max-width: 480px) {
    .tfc-brand-list-view { text-align: center; }
    .tfc-brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .tfc-brand-card {
        padding: 10px;
        min-height: 70px;
    }
    .tfc-brand-card img {
        max-width: 100px;
        max-height: 45px;
    }
    .tfc-view-quote-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* ========================================
   SUBMIT QUOTE PAGE — Mobile
   ======================================== */
@media screen and (max-width: 768px) {
    .tfc-cart-summary {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tfc-cart-table {
        min-width: 500px;
    }
}
