/* ========================================
   KADENCE G73 THEME INTEGRATION - v3 AGGRESSIVE
   for Fluent Community Portal
   FIXES: Inline styles, header visibility, logo display
   ======================================== */

/* Import Kadence Fonts */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&family=Cormorant+Garamond:wght@400;500;600;700&display=swap');

/* ========================================
   GLOBAL STYLES
   ======================================== */

body {
  font-family: 'Jost', sans-serif !important;
  font-size: 18px !important;
  line-height: 1.6 !important;
  color: #595a4a !important;
  background: #ffffff !important;
}

/* Remove grey backgrounds from all containers */
.fcom_wrap,
.fluent_com,
.fhr_wrap,
.fcom_app_container,
.fcom_main_body,
.fcom_body_container {
  background: #ffffff !important;
}

h1, h2, h3, h4, h5, h6,
.fcom_post_title,
.fcom_space_title,
.fcom_course_title {
  font-family: 'Cormorant Garamond', serif !important;
  color: #262626 !important;
}

h1 {
  font-size: 46px !important;
  line-height: 1.2 !important;
  color: #262626 !important;
}

h2 {
  font-size: 36px !important;
  line-height: 1.2 !important;
  color: #262626 !important;
}

h3 {
  font-size: 30px !important;
  line-height: 1.2 !important;
  color: #262626 !important;
}

h4 {
  font-size: 24px !important;
  line-height: 1.2 !important;
  color: #262626 !important;
}

h5 {
  font-size: 20px !important;
  line-height: 1.2 !important;
  color: #262626 !important;
}

h6 {
  font-size: 15px !important;
  line-height: 1.2 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #7f834e !important;
}

/* ========================================
   HEADER STYLING - MATCH KADENCE
   AGGRESSIVE OVERRIDES
   ======================================== */

.fcom_top_menu {
  background: #ffffff !important;
  border-bottom: 2px solid rgba(0,0,0,0.1) !important;
  min-height: 110px !important;
  padding: 0 100px !important;
  box-shadow: none !important;
}

/* ========================================
   HAMBURGER BUTTON - OVERRIDE INLINE STYLES
   ======================================== */

.fcom_space_opener_btn,
.fcom_space_opener_btn[style],
button.fcom_space_opener_btn {
  color: #262626 !important;
  background: transparent !important;
  border: none !important;
  opacity: 1 !important;
}

.fcom_space_opener_btn svg,
.fcom_space_opener_btn path,
.fcom_space_opener_btn[style] svg,
.fcom_space_opener_btn[style] path {
  fill: #262626 !important;
  color: #262626 !important;
  stroke: #262626 !important;
}

.fcom_space_opener_btn:hover,
.fcom_space_opener_btn[style]:hover {
  color: #7f834e !important;
}

.fcom_space_opener_btn:hover svg,
.fcom_space_opener_btn:hover path {
  fill: #7f834e !important;
  color: #7f834e !important;
  stroke: #7f834e !important;
}

/* ========================================
   LOGO SECTION - MAKE VISIBLE
   ======================================== */

.fhr_logo {
  display: flex !important;
  align-items: center !important;
}

.fhr_logo a {
  display: flex !important;
  align-items: center !important;
  opacity: 1 !important;
}

.fhr_logo img,
.fhr_logo img.show_on_light,
.fhr_logo img.show_on_dark {
  max-width: 180px !important;
  height: auto !important;
  opacity: 1 !important;
  display: block !important;
  filter: none !important;
}

/* Show only light logo, hide dark logo */
html:not(.dark) .fhr_logo img.show_on_dark {
  display: none !important;
}

html:not(.dark) .fhr_logo img.show_on_light {
  display: block !important;
}

/* ========================================
   MAIN MENU - AGGRESSIVE TEXT VISIBILITY
   ======================================== */

.fcom_header_menu.top_menu_items {
  display: flex !important;
  gap: 0 !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fcom_header_menu li.fcom_menu_item,
.fcom_header_menu li {
  list-style: none !important;
  margin: 0 !important;
}

.fcom_header_menu li a,
.fcom_header_menu li a.fcom_menu_link,
.fcom_header_menu li a[class*="fcom_"] {
  font-family: 'Jost', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #262626 !important;
  padding: 0.6em 1.1em !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  border: none !important;
  opacity: 1 !important;
  background: transparent !important;
}

.fcom_header_menu li a .community_name,
.fcom_header_menu li a span.community_name {
  color: #262626 !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

.fcom_header_menu li a:hover,
.fcom_header_menu li a:hover .community_name,
.fcom_header_menu li a:hover span,
.fcom_header_menu li a.router-link-active,
.fcom_header_menu li a.router-link-active .community_name,
.fcom_header_menu li a.fcom_menu_link:hover {
  color: #7f834e !important;
  background: transparent !important;
}

/* ========================================
   RIGHT SIDE MENU - ICONS & LOGIN BUTTON
   ======================================== */

.top_menu_right {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

/* All icons in right menu */
.top_menu_right button,
.top_menu_right .fcom_menu_button,
.top_menu_right button[class*="fcom_"] {
  color: #262626 !important;
  background: transparent !important;
  border: none !important;
  opacity: 1 !important;
}

.top_menu_right svg,
.top_menu_right path,
.top_menu_right button svg,
.top_menu_right button path {
  fill: #262626 !important;
  color: #262626 !important;
  stroke: #262626 !important;
  opacity: 1 !important;
}

.top_menu_right button:hover,
.top_menu_right .fcom_menu_button:hover {
  color: #7f834e !important;
}

.top_menu_right button:hover svg,
.top_menu_right button:hover path {
  fill: #7f834e !important;
  color: #7f834e !important;
  stroke: #7f834e !important;
}

/* Color Mode Toggle - specific targeting */
.fcom_color_mode_core {
  color: #262626 !important;
  background: transparent !important;
}

.fcom_color_mode_core svg,
.fcom_color_mode_core path {
  fill: #262626 !important;
  color: #262626 !important;
  stroke: #262626 !important;
}

.fcom_color_mode_core:hover {
  color: #7f834e !important;
}

.fcom_color_mode_core:hover svg,
.fcom_color_mode_core:hover path {
  fill: #7f834e !important;
  stroke: #7f834e !important;
}

/* Login Button */
.fcom_login_btn,
a.fcom_login_btn,
.fcom_primary_button {
  background-color: #7f834e !important;
  color: #ffffff !important;
  border-radius: 0px !important;
  padding: 12px 24px !important;
  font-size: 14px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.fcom_login_btn:hover,
a.fcom_login_btn:hover {
  background-color: #262626 !important;
  color: #ffffff !important;
  box-shadow: 0px 15px 25px -7px rgba(0,0,0,0.15) !important;
}

.fcom_login_btn span {
  color: #ffffff !important;
}

/* ========================================
   BUTTONS - MATCH KADENCE STYLE
   ======================================== */

.fcom-btn-primary,
.fcom-primary-btn,
button.fcom-btn,
.fcom_button,
.el-button--primary {
  background-color: #7f834e !important;
  color: #ffffff !important;
  border-radius: 0px !important;
  padding: 18px 30px !important;
  font-size: 16px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: normal !important;
  border: none !important;
  box-shadow: 0px 0px 0px -7px rgba(0,0,0,0) !important;
  transition: all 0.2s ease !important;
}

.fcom-btn-primary:hover,
.fcom-primary-btn:hover,
button.fcom-btn:hover,
.fcom_button:hover,
.el-button--primary:hover {
  background-color: #262626 !important;
  color: #ffffff !important;
  box-shadow: 0px 15px 25px -7px rgba(0,0,0,0.15) !important;
}

/* Secondary Buttons */
.fcom-btn-secondary,
.el-button--default {
  background: transparent !important;
  color: #262626 !important;
  border: 1px solid #262626 !important;
  border-radius: 0px !important;
  padding: 18px 30px !important;
  font-size: 16px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-family: 'Jost', sans-serif !important;
}

.fcom-btn-secondary:hover,
.el-button--default:hover {
  background: #262626 !important;
  color: #ffffff !important;
}

/* ========================================
   CONTENT AREA STYLING
   ======================================== */

/* Remove grey backgrounds */
.fcom_main_content,
.fcom_feed_wrap,
.fcom_space_content,
.fcom_body_inner,
.fcom_feeds_inner,
.fcom_main_body_inner {
  background: #ffffff !important;
  border-radius: 0px !important;
}

/* Post Cards - keep white with subtle shadow */
.fcom_feed_item,
.fcom_post_item,
.fcom_post_box {
  background: #ffffff !important;
  border-radius: 0px !important;
  box-shadow: 0px 2px 8px rgba(0,0,0,0.06) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  margin-bottom: 20px !important;
}

/* Links */
a {
  color: #7f834e !important;
  text-decoration: none !important;
}

a:hover {
  color: #262626 !important;
}

/* ========================================
   FOOTER INJECTION AREA
   ======================================== */

#kadence-footer-injected {
  font-family: 'Jost', sans-serif !important;
  background: #ffffff !important;
  border-top: 2px solid rgba(0,0,0,0.1);
  padding: 60px 0 20px 0;
  margin-top: 50px;
}

#kadence-footer-injected .footer-logo {
  text-align: center;
  margin-bottom: 30px;
}

#kadence-footer-injected .footer-logo img {
  max-width: 150px;
  height: auto;
}

#kadence-footer-injected .footer-navigation {
  text-align: center;
  margin-bottom: 20px;
}

#kadence-footer-injected .footer-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

#kadence-footer-injected .footer-navigation li {
  margin: 0;
}

#kadence-footer-injected .footer-navigation a {
  font-family: 'Jost', sans-serif !important;
  font-size: 16px !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #262626 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

#kadence-footer-injected .footer-navigation a:hover {
  color: #7f834e !important;
}

#kadence-footer-injected .footer-copyright {
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: #595a4a;
  border-top: 1px solid rgba(0,0,0,0.05);
}

#kadence-footer-injected .footer-copyright a {
  color: #7f834e !important;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 1024px) {
  .fcom_top_menu {
    padding: 0 30px !important;
    min-height: 90px !important;
  }

  h1 {
    font-size: 42px !important;
  }

  h2 {
    font-size: 30px !important;
  }

  h3 {
    font-size: 26px !important;
  }
}

@media (max-width: 767px) {
  .fcom_top_menu {
    padding: 0 15px !important;
    min-height: 70px !important;
  }

  body {
    font-size: 16px !important;
  }

  #kadence-footer-injected .footer-navigation ul {
    flex-direction: column;
    gap: 15px;
  }
}

/* ========================================
   SIDEBAR STYLING
   ======================================== */

.fcom_sidebar,
.fcom_right_sidebar,
.fcom_left_sidebar,
.fcom_spaces_sidebar {
  background: #ffffff !important;
}

.fcom_sidebar .fcom_widget,
.fcom_right_sidebar .fcom_widget {
  background: #ffffff !important;
  border-radius: 0px !important;
  box-shadow: 0px 2px 8px rgba(0,0,0,0.06) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
.el-input__inner,
.el-textarea__inner {
  font-family: 'Jost', sans-serif !important;
  font-size: 18px !important;
  color: #595a4a !important;
  border: 1px solid #e3e8ee !important;
  border-radius: 0px !important;
  padding: 12px 15px !important;
  background: #ffffff !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
.el-input__inner:focus,
.el-textarea__inner:focus {
  border-color: #7f834e !important;
  outline: none !important;
  background: #ffffff !important;
}

/* ========================================
   HIDE FLUENT COMMUNITY BRANDING
   ======================================== */

.fcom_side_footer {
  display: none !important;
}

/* ========================================
   ADDITIONAL CONTRAST FIXES
   ======================================== */

.fcom_post_title,
.fcom_feed_title,
.page_title,
.feed_title {
  color: #262626 !important;
  font-family: 'Cormorant Garamond', serif !important;
}

.fcom_user_name,
.fcom_author_name,
.post_author {
  color: #262626 !important;
  font-weight: 600 !important;
}

.fcom_post_content,
.fcom_feed_content,
.post_content {
  color: #595a4a !important;
}

.fcom_meta_info,
.post_meta,
.fcom_time {
  color: #9a9b8e !important;
}

/* Hide lesson title and description for Coach Chat (clean chat view) */
[href*="/lessons/coach-chat"] .fcom_lesson_header,
[href*="/lessons/coach-chat"] .fcom_lesson_title,
[href*="/lessons/coach-chat"] .fcom_lesson_description,
body.fcom_lesson_page[data-slug="coach-chat"] .fcom_lesson_header,
body.fcom_lesson_page[data-slug="coach-chat"] .fcom_lesson_title,
body.fcom_lesson_page[data-slug="coach-chat"] .fcom_lesson_description {
  display: none !important;
}

/* Ensure chat takes full width in Coach Chat lesson */
body.fcom_lesson_page[data-slug="coach-chat"] .phiton-chat-only-container,
body.fcom_lesson_page[data-slug="coach-chat"] #phiton-chat {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Fix scrolling issues in Coach Chat lesson */
/* Prevent nested scrollbars and auto-scroll to bottom */
.fcom_lesson_content:has(.phiton-chat-wrapper) {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

/* Ensure lesson content wrapper doesn't create scrollbar */
.fcom_lesson_inner:has(.phiton-chat-wrapper),
.fcom_lesson_body:has(.phiton-chat-wrapper) {
  overflow: visible !important;
}

/* Scroll to top when Coach Chat loads */
body.fcom_lesson_page[data-slug="coach-chat"] {
  scroll-behavior: smooth;
}

/* Fix chat container height to prevent scroll issues */
.phiton-chat-wrapper {
  min-height: 600px !important;
  max-height: calc(100vh - 200px) !important;
  overflow: visible !important;
}

/* The SecureChat component should handle its own scrolling */
#phiton-chat .chat-messages-container {
  max-height: calc(100vh - 300px) !important;
  overflow-y: auto !important;
}

/* Make chat take full width of lesson area - selective targeting */
.phiton-chat-wrapper,
#phiton-chat,
#phiton-chat > div.space-y-6,
#phiton-chat .card {
  max-width: none !important;
  width: 100% !important;
}

/* Messages container should be full width */
#phiton-chat .space-y-4,
#phiton-chat .bg-gray-50 {
  max-width: none !important;
  width: 100% !important;
}

/* Keep form layout intact - DON'T force width on flex items */
#phiton-chat form,
#phiton-chat form .space-y-3,
#phiton-chat form .flex.items-end {
  max-width: none !important;
  width: 100% !important;
}

/* FORCE bottom alignment on the flex container */
#phiton-chat form .flex.items-end {
  display: flex !important;
  align-items: flex-end !important;
  gap: 0.5rem !important;
}

/* Textarea container should expand to fill space */
#phiton-chat form .flex.items-end > div.flex-1 {
  flex: 1 !important;
  width: 100% !important;
  display: flex !important;
  align-items: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Textarea should take full width of its container */
#phiton-chat form textarea {
  width: 100% !important;
  margin: 0 !important;
}

/* Button containers should keep their natural width and align properly */
#phiton-chat form .flex.items-end > div.flex-col {
  width: auto !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  justify-content: flex-end !important;
}

/* Make buttons larger and properly sized */
#phiton-chat form .flex.items-end button,
#phiton-chat form .flex.items-end label.btn-secondary {
  min-width: 48px !important;
  min-height: 48px !important;
  width: 48px !important;
  height: 48px !important;
  padding: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.375rem !important;
}

/* Icon sizing within buttons */
#phiton-chat form .flex.items-end button svg,
#phiton-chat form .flex.items-end label.btn-secondary svg {
  width: 20px !important;
  height: 20px !important;
}

/* Remove card styling that might constrain width */
.fcom_lesson_content .phiton-chat-wrapper .card {
  padding: 20px !important;
  margin: 0 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
  background: #ffffff !important;
  border-radius: 0.5rem !important;
}

/* Ensure lesson content wrapper doesn't constrain */
.fcom_lesson_content:has(.phiton-chat-wrapper) {
  max-width: none !important;
  width: 100% !important;
}

/* ---------------------------------------------------------------
 * Mobile bottom-nav — even icon distribution
 *
 * Fluent Community's default puts `width: 100%` on each item +
 * `padding: 12px 20px`. With 7+ icons that wraps weirdly or feels
 * cramped depending on the device width. Switch to `flex: 1` so
 * each icon takes an equal share of available width, and tighten
 * the horizontal padding so all icons stay in view even on small
 * phones (iPhone SE = 320px). Vertical padding stays the same so
 * the tap target height isn't reduced.
 * --------------------------------------------------------------- */
.fcom_mobile_menu .focm_menu_items {
  /* override FC default — space-around plus our flex:1 below keeps
     the distribution even at any width */
  padding: 8px 4px 12px !important;
  gap: 0 !important;
}
.fcom_mobile_menu .focm_menu_items .focm_menu_item {
  width: auto !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 12px 6px !important;        /* tighter horizontal, same vertical */
  font-size: 20px !important;
}
.fcom_mobile_menu .focm_menu_item svg {
  margin: 0 auto;
  display: block;
}
@media (max-width: 360px) {
  .fcom_mobile_menu .focm_menu_items .focm_menu_item {
    padding: 12px 2px !important;       /* even tighter on iPhone SE 1st gen */
  }
  .fcom_mobile_menu .focm_menu_item svg {
    width: 18px;
    height: 18px;
  }
}
