/**
 * TH Author Profile Shortcode Styles - 12 Corporate Classes Architecture
 * Bulletproof layout for Enfold, Avia Builder, and standard WordPress themes.
 */

/* Outer Box Container */
.apex-author-box-container,
.th-author-profile-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e3e8ee !important;
  border-radius: 20px !important;
  padding: 15px 20px !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  margin: 0px !important;
  max-width: 100% !important;
  width: 100% !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  clear: both !important;
}

.apex-author-box-container *,
.th-author-profile-box * {
  box-sizing: border-box !important;
}

.apex-author-box-container:hover,
.th-author-profile-box:hover {
  border-color: #d1d9e2 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05) !important;
}

/* ==========================================================================
   ZONE 1: THE TWO TOP HORIZONTAL CTA BOXES
   ========================================================================== */
.apex-author-box-container .apex-cta-buttons-wrapper,
.th-author-profile-box .apex-cta-buttons-wrapper,
.apex-author-box-container .th-author-cta-group,
.th-author-profile-box .th-author-cta-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  width: 100% !important;
  border: none !important;
}

/* Common CTA Button Styles */
.apex-author-box-container .apex-cta-business,
.th-author-profile-box .apex-cta-business,
.apex-author-box-container .apex-cta-private,
.th-author-profile-box .apex-cta-private,
.apex-author-box-container .th-author-cta-btn,
.th-author-profile-box .th-author-cta-btn {
  flex: 1 1 0% !important;
  width: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 5px 9px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease !important;
  line-height: 1.35 !important;
  cursor: pointer !important;
  text-align: center !important;
  outline: none !important;
}

/* CTA Button 1 (Business / B2B) - Standard Corporate Style */
.apex-author-box-container .apex-cta-business,
.th-author-profile-box .apex-cta-business {
  background-color: #766a52 !important;
  color: #ffffff !important;
  border: 1.5px solid #766a52 !important;
  box-shadow: 0 2px 6px rgba(118, 106, 82, 0.22) !important;
  letter-spacing: 0.1px !important;
}

.apex-author-box-container .apex-cta-business:hover,
.th-author-profile-box .apex-cta-business:hover {
  background-color: #ffffff !important;
  border-color: #766a52 !important;
  color: #766a52 !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 12px rgba(118, 106, 82, 0.28) !important;
}

.apex-author-box-container .apex-cta-business:active,
.th-author-profile-box .apex-cta-business:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 3px rgba(118, 106, 82, 0.2) !important;
}

/* CTA Button 2 (Private / B2C) - Standard Consumer Style */
.apex-author-box-container .apex-cta-private,
.th-author-profile-box .apex-cta-private {
  background-color: #f8fafc !important;
  color: #766a52 !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.apex-author-box-container .apex-cta-private:hover,
.th-author-profile-box .apex-cta-private:hover {
  background-color: #ffffff !important;
  border-color: #766a52 !important;
  color: #766a52 !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;
}

.apex-author-box-container .apex-cta-private:active,
.th-author-profile-box .apex-cta-private:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Dynamic Free-Text Elements inside Buttons */
.apex-cta-businesstext,
.apex-cta-business-text,
.apex-cta-privatetext,
.apex-cta-private-text {
  display: inline-block !important;
  font-weight: 600 !important;
  letter-spacing: 0.1px !important;
}

/* Dynamic Icon Containers inside Buttons */
.apex-cta-business-icon,
.apex-cta-private-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}

.apex-cta-business-icon svg,
.apex-cta-private-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
  display: block !important;
}

/* ==========================================================================
   ZONE 2 & 3 BODY WRAPPER (Horizontal Row below Top CTAs)
   ========================================================================== */
.apex-author-box-container .apex-author-body-wrapper,
.th-author-profile-box .apex-author-body-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================================
   ZONE 2: THE PROFILE LEFT-CONTAINER & VERTICAL SOCIALS
   ========================================================================== */
.apex-author-box-container .apex-profile-left-wrapper,
.th-author-profile-box .apex-profile-left-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Profile Photo Container with local media support & XXXX placeholder */
.apex-author-box-container .apex-author-image,
.th-author-profile-box .apex-author-image,
.apex-author-box-container .th-author-avatar-wrap,
.th-author-profile-box .th-author-avatar-wrap {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background-color: #f5a623 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.5px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.apex-author-image img,
.th-author-avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Vertical Social Stack */
.apex-author-box-container .apex-social-vertical-stack,
.th-author-profile-box .apex-social-vertical-stack,
.apex-author-box-container .th-author-social-list,
.th-author-profile-box .th-author-social-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.apex-author-box-container .apex-social-vertical-stack a,
.th-author-profile-box .apex-social-vertical-stack a,
.apex-author-box-container .th-author-social-link,
.th-author-profile-box .th-author-social-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  background-color: #766a52 !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.apex-author-box-container .apex-social-vertical-stack a:hover,
.th-author-profile-box .apex-social-vertical-stack a:hover,
.apex-author-box-container .th-author-social-link:hover,
.th-author-profile-box .th-author-social-link:hover {
  background-color: #173830 !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 2px 6px rgba(35, 77, 67, 0.35) !important;
}

.apex-social-vertical-stack svg,
.th-author-social-icon {
  width: 14px !important;
  height: 14px !important;
  fill: currentColor !important;
  display: block !important;
}

/* ==========================================================================
   ZONE 3: THE MAIN RIGHT-FLUID TEXT FIELD
   ========================================================================== */
.apex-author-box-container .apex-profile-right-content,
.th-author-profile-box .apex-profile-right-content,
.apex-author-box-container .th-author-content,
.th-author-profile-box .th-author-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.apex-author-box-container .apex-author-name,
.th-author-profile-box .apex-author-name,
.apex-author-box-container .th-author-name,
.th-author-profile-box .th-author-name {
  margin: 0 0 5px 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #766a52 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.2px !important;
  border: none !important;
}

.apex-author-box-container .apex-author-bio,
.th-author-profile-box .apex-author-bio,
.apex-author-box-container .th-author-bio,
.th-author-profile-box .th-author-bio {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: #334155 !important;
  font-weight: 400 !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS (Mobile Viewport)
   ========================================================================== */
@media (max-width: 680px) {
  .apex-author-box-container,
  .th-author-profile-box {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .apex-author-box-container .apex-cta-buttons-wrapper,
  .th-author-profile-box .apex-cta-buttons-wrapper,
  .apex-author-box-container .th-author-cta-group,
  .th-author-profile-box .th-author-cta-group {
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .apex-author-box-container .apex-cta-business,
  .th-author-profile-box .apex-cta-business,
  .apex-author-box-container .apex-cta-private,
  .th-author-profile-box .apex-cta-private,
  .apex-author-box-container .th-author-cta-btn,
  .th-author-profile-box .th-author-cta-btn {
    width: 100% !important;
    padding: 8px 14px !important;
  }

  .apex-author-box-container .apex-author-body-wrapper,
  .th-author-profile-box .apex-author-body-wrapper {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .apex-author-box-container .apex-profile-left-wrapper,
  .th-author-profile-box .apex-profile-left-wrapper {
    gap: 12px !important;
  }

  .apex-author-box-container .apex-social-vertical-stack,
  .th-author-profile-box .apex-social-vertical-stack,
  .apex-author-box-container .th-author-social-list,
  .th-author-profile-box .th-author-social-list {
    flex-direction: row !important;
    gap: 6px !important;
  }
}