/* ============================================
   OpenHomes — Agent Profile Styles
   ============================================ */

.profile-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 90px 24px 80px;
}

/* ---- Agent Header ---- */
.profile-header {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  background: var(--oh-surface);
  border: 1px solid var(--oh-border);
  border-radius: var(--oh-radius);
  padding: 32px 32px 30px;
  margin-bottom: 40px;
  box-shadow: var(--oh-shadow);
}

.profile-share-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--oh-border);
  border-radius: 20px;
  padding: 6px 14px;
  gap: 6px;
  font-size: 13px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  transition: color .2s, border-color .2s, background .2s;
}
.profile-share-btn svg {
  width: 16px;
  height: 16px;
}
.profile-share-btn:hover {
  color: #777;
  border-color: #999;
}
.profile-share-btn:active {
  color: var(--oh-accent);
  border-color: var(--oh-accent);
  background: rgba(212,168,83,.08);
}

/* ---- Toast ---- */
.profile-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--oh-surface);
  color: var(--oh-text);
  border: 1px solid var(--oh-accent);
  border-radius: var(--oh-radius);
  padding: 12px 24px;
  font-size: .9rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
  pointer-events: none;
}
.profile-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (min-width: 768px) {
  .profile-toast.show { transform: translateY(-50%) translateX(0); }
}

.profile-agency-strip {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  display: flex;
  justify-content: center;
  padding: 16px 0;
  margin-top: -90px;
  padding-top: 96px;
  margin-bottom: 24px;
  background: transparent;
  transition: background .4s;
}

.profile-agency-logo-top {
  display: flex;
  justify-content: center;
}

.profile-agency-logo-top .profile-agency-logo {
  height: 64px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity .4s;
}
.profile-agency-logo-top .profile-agency-logo.loaded {
  opacity: 1;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--oh-warm);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Aleo', serif;
  font-weight: 700;
  font-size: 40px;
  text-transform: uppercase;
}

.profile-info {
  flex: 1;
  min-width: 0;
}
.profile-name {
  font-family: 'Aleo', serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--oh-text);
  margin-bottom: 6px;
  line-height: 1.2;
}
.profile-agency {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--oh-text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.profile-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--oh-surface);
  color: var(--oh-text);
  border: 1px solid var(--oh-border);
  padding: 12px 24px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all .25s;
  white-space: nowrap;
}
.profile-call-btn:hover {
  transform: translateY(-1px);
  border-color: var(--oh-accent);
  box-shadow: 0 4px 16px rgba(212,168,83,.15);
}

/* ---- Section ---- */
.profile-section {
  margin-bottom: 40px;
}
.profile-section-title {
  font-family: 'Aleo', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--oh-text);
  margin-bottom: 24px;
}
.profile-section-title span {
  color: var(--oh-text-secondary);
  font-weight: 400;
  font-size: 18px;
}

/* ---- Listings List (horizontal cards) ---- */
.profile-listings-list {
  columns: 2 340px;
  column-gap: 24px;
}
.profile-listings-list > * {
  break-inside: avoid;
  margin-bottom: 24px;
}

/* ---- Open Home Time Slots ---- */
.profile-listing-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 0 20px 20px;
}

.profile-slot-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--oh-bg);
  border: 1px solid var(--oh-border);
  border-radius: var(--oh-radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  position: relative;
  overflow: hidden;
  font-size: 13px;
  color: var(--oh-text-secondary);
  transform: translateY(0);
  transition: all .25s, transform .1s;
}
.profile-slot-tile::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle 120px at var(--mx, -100px) var(--my, -100px), rgba(212,168,83,.15), transparent 70%);
  opacity: 0; transition: opacity .2s;
}
@media (hover: hover) { .profile-slot-tile:hover::before { opacity: 1; } }
.profile-slot-tile.glow-active::before { opacity: 1; }
.profile-slot-tile.glow-out::before { opacity: 0 !important; transition: opacity .4s; }
.profile-slot-tile:hover {
  border-color: var(--oh-accent);
  background: var(--oh-accent-bg);
}
.profile-slot-tile:active {
  transform: translateY(2px);
}

.profile-slot-fav {
  border-color: rgba(212,168,83,.4);
  background: rgba(212,168,83,.08);
}
.profile-slot-fav:hover {
  border-color: rgba(212,168,83,.6);
  background: rgba(212,168,83,.12);
}

.profile-slot-datetime {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-slot-date,
.profile-slot-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.profile-slot-date svg {
  color: var(--oh-accent);
  margin-left: 6px;
}
.profile-slot-time svg {
  color: var(--oh-accent);
  opacity: .8;
}

.profile-slot-tile .fav-btn {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ---- Error State ---- */
.profile-error {
  text-align: center;
  padding: 100px 20px;
}
.profile-error h2 {
  font-family: 'Aleo', serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--oh-text);
  margin-bottom: 20px;
}

/* ---- Empty State ---- */
.profile-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--oh-text-secondary);
  font-size: 15px;
}

/* ---- Back Link ---- */
.profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--oh-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .2s;
}
.profile-back-link:hover {
  color: var(--oh-accent);
}

/* ---- Agency logo swap (theme-aware) ---- */
.profile-agency-logo-top .agency-logo-swap { position: relative; display: inline-flex; flex-shrink: 0; }
.profile-agency-logo-top .agency-logo-swap .profile-agency-logo { transition: opacity .4s ease; }
.profile-agency-logo-top .agency-logo-swap .agency-logo-light { position: absolute; top: 0; left: 0; opacity: 0; }
.profile-agency-logo-top .agency-logo-swap .agency-logo-dark { opacity: 1; }
.light-theme .profile-agency-logo-top .agency-logo-swap .agency-logo-light { opacity: 1; }
.light-theme .profile-agency-logo-top .agency-logo-swap .agency-logo-dark { opacity: 0; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .profile-content {
    padding: 80px 16px 60px;
  }
  .profile-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 24px 20px;
    gap: 16px;
  }
  .profile-avatar {
    width: 80px;
    height: 80px;
  }
  .profile-avatar-placeholder {
    font-size: 32px;
  }
  .profile-name {
    font-size: 22px;
  }
  .profile-agency {
    justify-content: center;
  }
  .profile-actions {
    justify-content: center;
  }
  .profile-listings-list {
    columns: 1;
  }
  .profile-listing-slots {
    padding: 0 20px 20px;
  }
}

@media (max-width: 480px) {
  .profile-header {
    padding: 20px 16px;
  }
  .profile-slot-datetime {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
}
