/*
 * TweetLife – Profile Pages (Offices + Contractors)
 * -------------------------------------------------
 * Scope: .tl-profile
 *
 * Goals:
 * - Clean, real-estate oriented UI
 * - Desktop: two-column layout with sticky side card
 * - Mobile: sticky action bar (WhatsApp/Call + Ads/Offers)
 * - Avoid side effects by scoping all selectors
 */

/* =====================
   Base wrapper
===================== */
.tl-profile{ overflow-x: clip; }

.tl-profile--has-mobilebar{
  /* Reserve space so content isn't covered by the mobile action bar */
  padding-bottom: calc(92px + var(--tl-bottom-nav-h, 0px) + var(--tl-safe-bottom, 0px));
}

@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-profile--has-mobilebar{ padding-bottom: 0; }
}

/* Improve anchor jumps with sticky header/nav */
.tl-profile .tl-profile-section{
  scroll-margin-top: calc(var(--tl-site-header-offset, 0px) + 90px);
}

/* =====================
   Hero
===================== */
.tl-profile-hero{
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--tl-shadow-md);
  color: #fff;
}

.tl-profile-hero--office{
  background: linear-gradient(135deg, #0F172A 0%, #1B2A6B 52%, #25BCCF 155%);
}

.tl-profile-hero--contractor{
  /* Slightly warmer accent for contractors without leaving the brand palette */
  background: linear-gradient(135deg, #0F172A 0%, #22307A 56%, #E1BA41 170%);
}

.tl-profile-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 420px at 10% 8%, rgba(37,188,207,.28), transparent 60%),
    radial-gradient(900px 380px at 92% 22%, rgba(225,186,65,.22), transparent 62%),
    radial-gradient(760px 320px at 40% 110%, rgba(255,255,255,.08), transparent 55%);
}

.tl-profile-hero__inner{
  position: relative;
  padding: 16px;
}

@media (min-width: 640px){
  .tl-profile-hero__inner{ padding: 26px; }
}

.tl-profile-hero__top{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-profile-hero__top{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.tl-profile-id{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.tl-profile-logo{
  width: 84px;
  height: 84px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

@media (min-width: 640px){
  .tl-profile-logo{
    width: 96px;
    height: 96px;
    border-radius: 26px;
  }
}

.tl-profile-logo img{ width: 100%; height: 100%; object-fit: cover; }

.tl-profile-nameRow{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tl-profile-name{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

@media (min-width: 640px){
  .tl-profile-name{ font-size: 30px; }
}

.tl-profile-subtitle{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,.86);
}

/* Badges */
.tl-profile-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tl-profile-badge--verified{
  background: linear-gradient(135deg, rgba(225,186,65,.98), rgba(37,188,207,.86));
  color: #0F172A;
  border-color: rgba(255,255,255,.55);
}

.tl-profile-badgeDot{ width: 8px; height: 8px; border-radius: 999px; background: #25BCCF; }
.tl-profile-badge--verified .tl-profile-badgeDot{ background:#0F172A; }

/* Hero actions */
.tl-profile-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-profile-actions{ justify-content: flex-end; }
}

/* Re-skin DS buttons inside hero (keep DS behavior but match dark hero) */
.tl-profile-hero .tl-btn{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  box-shadow: none;
  border-radius: 18px;
}
.tl-profile-hero .tl-btn:hover{ background: rgba(255,255,255,.16); }

.tl-profile-hero .tl-profile-btn--brand{
  background: linear-gradient(135deg, rgba(225,186,65,.98), rgba(37,188,207,.86));
  color: #0F172A;
  border-color: rgba(255,255,255,.55);
}

.tl-profile-hero .tl-profile-btn--wa{
  background: linear-gradient(135deg, #075E54, #25D366);
  color: #fff;
  border-color: rgba(255,255,255,.22);
}

/* KPI chips */
.tl-profile-kpis{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tl-profile-kpi{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,.95);
}

.tl-profile-kpi svg{ width: 16px; height: 16px; opacity: .95; }

.tl-profile-stars{ color: var(--tl-brand-gold); letter-spacing: .08em; }

.tl-profile-desc{
  margin-top: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  line-height: 1.95;
  color: rgba(255,255,255,.92);
  white-space: pre-line;
}

/* =====================
   Anchor nav (sticky)
===================== */
.tl-profile-nav{
  position: sticky;
  top: calc(var(--tl-site-header-offset, 0px) + 10px);
  z-index: 25;
  margin-top: -14px;
}

.tl-profile-nav__bar{
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.92);
  box-shadow: var(--tl-shadow-sm);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tl-profile-nav__bar::-webkit-scrollbar{ display: none; }

.tl-profile-nav__link{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #0B1220;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.tl-profile-nav__link:hover{ background: rgba(241,245,249,.92); }

/* =====================
   Layout + cards
===================== */
.tl-profile-layout{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-profile-layout{
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
  }
}

.tl-profile-card{
  background: #fff;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 28px;
  box-shadow: var(--tl-shadow-sm);
  overflow: hidden;
}

.tl-profile-card__head{
  padding: 16px;
  border-bottom: 1px solid rgba(148,163,184,.18);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

@media (min-width: 640px){
  .tl-profile-card__head{ padding: 18px; }
}

.tl-profile-card__title{
  font-size: 16px;
  font-weight: 900;
  color: #0B1220;
}

.tl-profile-card__sub{
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.8;
  color: #64748B;
}

.tl-profile-card__body{ padding: 16px; }
@media (min-width: 640px){ .tl-profile-card__body{ padding: 18px; } }

/* Sticky sidebar on desktop */
@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-profile-side .tl-profile-card{
    position: sticky;
    top: calc(var(--tl-site-header-offset, 0px) + 12px);
  }
}

.tl-profile-infoGrid{ display: grid; gap: 10px; }

.tl-profile-infoItem{
  border: 1px solid rgba(148,163,184,.24);
  background: #fff;
  border-radius: 18px;
  padding: 12px;
}

.tl-profile-infoItem .k{ font-size: 12px; color: #64748B; }
.tl-profile-infoItem .v{ margin-top: 4px; font-weight: 900; color:#0B1220; line-height: 1.7; }

.tl-profile-qr{
  margin-top: 12px;
  border-radius: 24px;
  border: 1px dashed rgba(148,163,184,.38);
  background: rgba(241,245,249,.92);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-profile-qr img{ width: 220px; height: 220px; }
@media (max-width: 420px){ .tl-profile-qr img{ width: 200px; height: 200px; } }

/* Select option color safety inside profile pages */
.tl-profile select option{ color: #0B1220; background: #fff; }

/* =====================
   Mobile action bar
===================== */
.tl-profile-mobilebar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tl-bottom-nav-h, 0px) + var(--tl-safe-bottom, 0px));
  padding: 10px 12px;
  z-index: 55;
  background: rgba(255,255,255,.94);
  border-top: 1px solid rgba(148,163,184,.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.tl-inapp .tl-profile-mobilebar{
  bottom: calc(var(--tl-safe-bottom, 0px));
}

.tl-profile-mobilebar__wrap{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 10px;
}

.tl-profile-mobilebar__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid rgba(148,163,184,.25);
  background: #fff;
  color: #0B1220;
  box-shadow: var(--tl-shadow-xs);
}

.tl-profile-mobilebar__btn:active{ transform: translateY(1px); }

.tl-profile-mobilebar__btn--wa{
  border-color: rgba(7,94,84,.25);
  background: linear-gradient(135deg, #075E54, #25D366);
  color: #fff;
}

.tl-profile-mobilebar__btn--brand{
  border-color: rgba(34,47,117,.25);
  background: linear-gradient(135deg, #0F172A 0%, #222F75 55%, #25BCCF 155%);
  color: #fff;
}

@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-profile-mobilebar{ display:none; }
}
