/* ========== TrustFusion Frontend v1.3.1 ========== */
/* Ensure [hidden] is always respected even if theme CSS overrides it */
[hidden]{display:none!important}
.tf-wrap{
  --tf-bg:#ffffff;
  --tf-text:#111827;
  --tf-muted:#6b7280;
  --tf-border:#e5e7eb;
  --tf-star:#f59e0b;
  --tf-shadow:0 1px 2px rgba(0,0,0,.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--tf-text);
}

/* ---------- Business header ---------- */
.tf-profile{
  border:1px solid var(--tf-border);border-radius:12px;padding:16px 18px;
  background:var(--tf-bg);box-shadow:var(--tf-shadow);margin-bottom:16px;
  position:relative;
}
/* Google "G" badge — top-right corner of header card */
.tf-gbp-badge{
  position:absolute;top:12px;right:14px;
  width:30px;height:30px;border-radius:50%;
  background:#fff;border:1.5px solid #e5e7eb;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 1px 3px rgba(0,0,0,.1);flex-shrink:0;
}
.tf-profile-inner{display:flex;gap:14px;align-items:flex-start}
/* Storefront icon box */
.tf-gbp-logo{
  flex-shrink:0;width:52px;height:52px;border-radius:10px;
  background:#e8f0fe;display:flex;align-items:center;justify-content:center;
}
.tf-profile-body{flex:1;min-width:0;padding-right:36px}
.tf-profile-name{font-size:18px;font-weight:700;margin-bottom:4px}
.tf-profile-rating{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:4px}
.tf-stars{color:var(--tf-star);letter-spacing:.5px}
.tf-rating-num{font-weight:600}
.tf-rating-total{color:var(--tf-muted);font-size:13px}
.tf-profile-address{color:var(--tf-muted);font-size:13px;margin-bottom:10px}
/* Action buttons inside header */
.tf-profile-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.tf-action-btn{
  display:inline-block;font-size:12px;font-weight:600;padding:5px 12px;
  border-radius:6px;text-decoration:none;transition:opacity .15s;white-space:nowrap;
}
.tf-action-btn:hover{text-decoration:none}
.tf-btn-maps{background:#f3f4f6;color:#374151;border:1px solid #d1d5db}
.tf-btn-maps:hover{background:#e5e7eb;color:#374151}
.tf-btn-review{background:#4285F4;color:#fff;border:1px solid #3367d6}
.tf-btn-review:hover{background:#3367d6;color:#fff}

/* ---------- GRID layout ---------- */
.tf-layout-grid .tf-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px;
}
.tf-card{
  border:1px solid var(--tf-border);
  border-radius:12px;
  padding:14px;
  background:var(--tf-bg);
  box-shadow:var(--tf-shadow);
  position:relative;
}
.tf-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.08)}
/* Google "G" badge — top-right of each review card */
.tf-card-google-badge{
  position:absolute;top:10px;right:12px;
  width:22px;height:22px;border-radius:50%;
  background:#fff;border:1px solid #e5e7eb;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 1px 2px rgba(0,0,0,.08);
}
.tf-card-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;padding-right:28px}
.tf-card .tf-author{display:flex;flex-direction:column}
.tf-card .tf-author strong{font-size:14px}
.tf-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover}
.tf-rating{font-size:14px;color:var(--tf-star);margin:6px 0}
.tf-text{font-size:14px;line-height:1.5}
.tf-time{font-size:12px;color:var(--tf-muted);margin-top:8px}

/* ---------- LIST layout ---------- */
.tf-layout-list .tf-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  list-style:none;
  padding:0;
  margin:0;
}
.tf-row{
  border:1px solid var(--tf-border);
  border-radius:12px;
  background:var(--tf-bg);
  box-shadow:var(--tf-shadow);
  padding:14px;
  position:relative;
}
.tf-row-head{display:flex;align-items:center;gap:12px;margin-bottom:6px;padding-right:28px}
.tf-row .tf-author{display:flex;flex-direction:column}
.tf-row .tf-rating{margin-left:auto}

/* ---------- Avatar placeholder ---------- */
.tf-avatar-placeholder{
  width:36px;height:36px;border-radius:50%;
  background:#e5e7eb;color:#6b7280;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:15px;flex-shrink:0;
}

/* ---------- Read More toggle ---------- */
.tf-read-more-btn,.tf-read-less-btn{
  background:none;border:none;padding:0;cursor:pointer;
  color:#4f46e5;font-size:13px;font-weight:600;text-decoration:underline;
  margin-left:4px;
}
.tf-read-more-btn:hover,.tf-read-less-btn:hover{color:#3730a3}

/* ---------- Hide Review button (admin only) ---------- */
.tf-hide-btn{
  display:block;width:fit-content;margin-left:auto;margin-top:10px;
  padding:3px 10px;font-size:11px;font-weight:600;
  background:#f3f4f6;border:1px solid #d1d5db;border-radius:6px;
  cursor:pointer;color:#6b7280;line-height:1.6;
}
.tf-hide-btn:hover{background:#fee2e2;border-color:#fca5a5;color:#dc2626}
.tf-card.tf-card-hiding,.tf-row.tf-row-hiding{
  transition:opacity .3s ease;opacity:0;
}

/* ---------- MULTI-LOCATION layout ---------- */

/* Company header */
.tf-multi-header{
  display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start;
  background:var(--tf-bg);border:1px solid var(--tf-border);
  border-radius:12px;padding:20px 22px;margin-bottom:20px;
  box-shadow:var(--tf-shadow);
}
.tf-multi-brand{flex:1;min-width:220px}
.tf-multi-name{font-size:22px;font-weight:700;color:var(--tf-text);margin-bottom:6px}
.tf-multi-hq-addr{font-size:14px;color:var(--tf-muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tf-pin{font-size:15px}
.tf-hq-badge{
  background:#dbeafe;color:#1d4ed8;font-size:11px;font-weight:700;
  padding:2px 8px;border-radius:20px;letter-spacing:.03em
}
.tf-multi-agg{text-align:right;flex-shrink:0}
.tf-multi-stars{display:flex;align-items:center;gap:4px;justify-content:flex-end;margin-bottom:4px}
.tf-star-full{color:var(--tf-star);font-size:20px}
.tf-star-empty{color:#d1d5db;font-size:20px}
.tf-agg-num{font-size:22px;font-weight:700;color:var(--tf-text)}
.tf-agg-sub{font-size:13px;color:var(--tf-muted)}

/* Location list — used in both multi and single-branch templates */
.tf-locations-list{margin-top:28px;margin-bottom:24px}
.tf-locations-title{
  font-size:15px;font-weight:700;color:var(--tf-text);
  margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid var(--tf-border)
}
.tf-locations-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px
}
.tf-loc-card{
  border:1px solid var(--tf-border);border-radius:10px;
  background:var(--tf-bg);padding:14px 16px;box-shadow:var(--tf-shadow);
}
.tf-loc-card.tf-loc-hq{border-color:#93c5fd;background:#eff6ff}
.tf-loc-top{display:flex;gap:10px;align-items:flex-start;margin-bottom:10px}
.tf-loc-pin{font-size:18px;flex-shrink:0;margin-top:2px}
.tf-loc-info{flex:1;min-width:0}
.tf-loc-addr{font-size:13px;color:var(--tf-text);line-height:1.4;margin-top:4px}
.tf-loc-rating{display:flex;align-items:center;gap:3px;margin-top:5px}
.tf-loc-num{font-weight:700;font-size:13px;margin-left:3px}
.tf-loc-total{color:var(--tf-muted);font-size:12px}
.tf-loc-actions{display:flex;gap:8px;flex-wrap:wrap}
.tf-loc-btn{
  display:inline-block;font-size:12px;font-weight:600;padding:5px 12px;
  border-radius:6px;text-decoration:none;transition:opacity .15s;
}
.tf-loc-btn:hover{text-decoration:none}
.tf-btn-view{background:#f3f4f6;color:#374151;border:1px solid #d1d5db}
.tf-btn-view:hover{background:#e5e7eb;color:#374151}
.tf-btn-write{background:#4f46e5;color:#fff;border:1px solid #4338ca}
.tf-btn-write:hover{background:#4338ca;color:#fff}

/* Action buttons inside multi-location header */
.tf-multi-actions{margin-top:10px}

/* Reviews section title */
.tf-multi-reviews-title{
  font-size:15px;font-weight:700;color:var(--tf-text);
  margin-bottom:14px;padding-bottom:8px;border-bottom:2px solid var(--tf-border)
}
.tf-wrap.tf-layout-multi .tf-multi-reviews .tf-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px
}
.tf-wrap.tf-layout-grid .tf-grid,
.tf-wrap.tf-layout-multi .tf-multi-reviews .tf-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px
}

/* ---------- Notices ---------- */
.tf-notice{
  padding:12px;border-radius:8px;background:#f9fafb;border:1px solid var(--tf-border);color:#111827
}

/* ---------- CAROUSEL layout ---------- */
.tf-layout-carousel .tf-carousel-outer{
  position:relative;
  padding:0 30px; /* reserve space so buttons never overlap cards */
}
.tf-layout-carousel .tf-carousel-wrapper{
  overflow:hidden;width:100%;
}
.tf-layout-carousel .tf-carousel-track{
  display:flex;gap:16px;transition:transform .4s cubic-bezier(.25,.8,.25,1);
}
/* Desktop: 3-up */
.tf-carousel-slide{
  flex:0 0 calc((100% - 32px) / 3);
  border:1px solid var(--tf-border);border-radius:12px;
  padding:16px;background:var(--tf-bg);box-shadow:var(--tf-shadow);
  box-sizing:border-box;position:relative;
}
@media (max-width:768px){
  .tf-carousel-slide{flex:0 0 calc((100% - 16px) / 2)}
}
@media (max-width:480px){
  .tf-carousel-slide{flex:0 0 100%}
}
/* Navigation buttons — circle with smooth hover transition */
.tf-carousel-btn{
  position:absolute;top:50%;transform:translateY(-50%);z-index:10;
  width:40px;height:40px;border-radius:30px;
  background:#fff;border:1.5px solid #e5e7eb;padding:0;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  color:#6b7280;
  box-shadow:0 1px 4px rgba(0,0,0,.10);
  transition:background .22s,border-color .22s,color .22s,box-shadow .22s;
}
.tf-carousel-prev{left:0}
.tf-carousel-next{right:0}
.tf-carousel-btn:hover{
  background:#4f46e5;border-color:#4f46e5;color:#fff;
  box-shadow:0 4px 12px rgba(79,70,229,.30);
}
/* Dots / counter */
.tf-carousel-dots{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:14px;min-height:16px}
.tf-dot{
  width:8px;height:8px;border-radius:50%;
  background:#d1d5db;cursor:pointer;transition:background .2s,transform .2s;
}
.tf-dot:hover{background:#a5b4fc}
.tf-dot-active{background:#4f46e5;transform:scale(1.3)}
.tf-carousel-counter{font-size:12px;color:var(--tf-muted);font-weight:600}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px){
  .tf-profile-main{align-items:flex-start}
  .tf-row-head{flex-wrap:wrap}
  .tf-row .tf-rating{margin-left:0}
}
