/*
Theme Name: Value of Gain
Theme URI: https://valueofgain.com
Author: Value of Gain
Author URI: https://valueofgain.com
Description: Modern theme for Value of Gain market analysis platform with Vue.js integration
Version: 6.0.10
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mkt

Styling Approach:
- CSS custom properties (--mkt-*) from WordPress Customizer provide theme colors
- Dark mode support via body.dark-mode class
- Seamless visual consistency with Vuetify-based Vue apps
*/

/* ===================================
   Base Styles
   =================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  background-color: rgb(var(--mkt-background));
}

/* ===================================
   Accessibility
   =================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
}

.skip-link:focus {
  top: 0;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ===================================
   Site Header
   =================================== */

.site-header {
  background: rgb(var(--mkt-background));
  /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;*/
  z-index: 1000;
}

.site-header-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0 6rem;
  flex-wrap: wrap;
}

/* Site Branding */

.site-branding {
  align-self: start;
  flex-shrink: 0;
  max-width: 100%;
}

.site-logo {
  /*max-width: 100%;*/
}

.site-logo img,
.custom-logo-link img {
  height: auto;
  max-height: 50px;
  width: auto;
  max-width: 100%;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-description {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: rgb(var(--mkt-secondary));
}


/* ===================================
   Content Area
   =================================== */

.site-content {
  min-height: calc(100vh - 200px);
}

.site-content-core {
  /*max-width: 1200px;*/
  margin: 0 auto;
  padding: .5rem;
}

/* ===================================
   Footer
   =================================== */

.site-footer {
  background: rgb(var(--mkt-background));
  margin: 12px 24px;
}

.footer-widgets {
  border-bottom: 1px solid rgb(var(--mkt-border-color));
}

.footer-widgets-container {
  /*max-width: 1200px;*/
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/*.footer-widget-area {
  Widget styling handled by WordPress
}*/

.site-footer-content {
  border-top: 2px solid rgb(var(--mkt-primary));
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 1rem;
  /*display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0 6rem;
  flex-wrap: wrap;*/  
}

.site-footer-columns {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.site-footer-columns > div,
.site-footer-columns > nav {
  width: 100%;
  padding: 1em;
}

.footer-navigation .footer-menu {
  /* display: flex; */
  /* list-style: none; */
  list-style: disc;
  margin: 1em;
  padding-left: 2em;
  /*gap: 1.5rem;
  flex-wrap: wrap;*/
}

.footer-menu a {
  color: rgb(var(--mkt-header-text));
  text-decoration: none;
  /*opacity: 0.8;
  transition: opacity 0.3s;*/
  line-height: 1.5;
}

.footer-menu a:hover,
.footer-menu a:focus {
  opacity: 1;
}

.site-info-container,
.site-info {
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: flex-end;
  gap: 0.5rem;
}

.copyright-text {
  font-size: 0.875rem;
  opacity: 0.8;
}

/*
.dark-mode-toggle {
  background: none;
  border: 1px solid rgb(var(--mkt-border-color));
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.dark-mode-toggle:hover {
  border-color: #999;
}

.dark-mode-icon {
  font-size: 1.25rem;
}

body:not(.dark-mode) .dark-icon {
  display: none;
}

body.dark-mode .light-icon {
  display: none;
}
*/

/* ===================================
   Dark Mode
   (--mkt-* custom properties are switched by customizer.php via @media
   and body.dark-mode :root. Only non-color structural overrides live here.)
   =================================== */

/*body.dark-mode {
  color: #e8e8e8;
}

body.dark-mode .site-header {
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}*/

/* ===================================
   Vue App Mount Point
   =================================== */

#app {
  min-height: 100vh;
}

/* ===================================
   App Access Control Overlay
   =================================== */

/* PHP-rendered SWPM overlay (positions over chart section) */
.mkt {
  position: relative;
}

.mkt-app-access-overlay {
  position: absolute;
  top: 120px; /* Offset to clear header and align with chart section */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: start;
  justify-content: center;
  pointer-events: none; /* Allow clicks through to underlying content */
}

.mkt-app-access-message {
  padding: 2rem 0;
  text-align: center;
  flex: 0 1 960px;
  pointer-events: auto; /* Re-enable clicks on the message itself */
  margin-top: 2rem;
}

.mkt-border {
  border-top: var(--mkt-border-width, 1px) solid rgb(var(--mkt-border-color));
  border-radius: 0;
}

.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

@media screen and (min-width: 960px) {
  .site-header-content {
    gap: 0 1rem;
  }

  .site-logo img, .custom-logo-link img {
    max-height: 60px;
  }
  
  .site-content-core {
    padding: 2rem;
  } 

  .site-footer-content {
    gap: 0 1rem;
  }

  .site-footer-columns > div,
  .site-footer-columns > nav {
    width: 33%;
  }

  .mkt-border {
    border: var(--mkt-border-width, 1px) solid rgb(var(--mkt-border-color));
    border-radius: var(--mkt-border-radius, 8px);
  }

  .mobile-only {
    display: none;
  }

  .desktop-only {
    display: block;
  }

}

/* ===================================
   Print Styles
   =================================== */

@media print {
  /* Hide WordPress and theme navigation/footer chrome */
  .main-navigation,
  .mkt-location-nav,
  .site-footer {
    display: none !important;
  }
}