/*
Theme Name: Promptless
Author: Promptless WP
Author URI: https://promptlesswp.com
Description: A minimal, accessibility-focused companion theme for the Promptless WP page builder. Inherits colors, typography, and border styling from the plugin's Global Settings. Ships with single-row and stacked header layouts, an optional utility top bar with separate left/right menus and mobile inline-or-collapse behavior, sticky header coordination, an accessible hamburger drawer with full keyboard focus trap, a built-in dark mode toggle, WooCommerce-aware styling with a mini-cart dropdown, and a three-column footer with HTML-capable brand description.
Version: 1.1.6
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: promptless
Tags: one-column, custom-logo, custom-menu, featured-images, full-width-template, block-styles, wide-blocks, blog, portfolio

Promptless Theme is designed as a companion to the Promptless WP page builder plugin.
It inherits all styling from the plugin's Global Settings, creating a cohesive website
where header, footer, and archive pages match the sections built with the plugin.
*/

/*
Promptless WordPress Theme, Copyright 2025 Promptless WP
Promptless is distributed under the terms of the GNU GPL v2 or later.
*/

/* ==========================================================================
   Base Reset & Defaults
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--aisb-section-font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--aisb-color-text, #1f2937);
  background-color: var(--aisb-color-background, #ffffff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Page Content Wrapper — Theme Variant Scoped Variables
   These rules live here (always-loaded style.css) rather than archive.css
   because .promptless-content is the page-content wrapper on EVERY template,
   not just archives. Without these, WC/checkout/cart/shop and other non-
   archive templates inherit no --section-bg/--section-text tokens and the
   page-content wrapper has no background-color, leaving page text invisible
   in dark mode (light-on-light) and missing variant theming everywhere.
   ========================================================================== */

.promptless-content.aisb-section--light {
    --section-bg: var(--aisb-color-background, #ffffff);
    --section-surface: var(--aisb-color-surface, #f9fafb);
    --section-text: var(--aisb-color-text, #1f2937);
    --section-text-muted: var(--aisb-color-text-muted, #6b7280);
    --section-border: var(--aisb-color-border, #e5e7eb);
    --section-primary: var(--aisb-color-primary, #6366f1);
    --section-link: var(--aisb-smart-light-section-link, var(--aisb-color-primary, #6366f1));
    --section-surface-link: var(--aisb-smart-light-surface-link, var(--aisb-color-primary, #6366f1));
}

.promptless-content.aisb-section--dark {
    --section-bg: var(--aisb-color-dark-background, #111827);
    --section-surface: var(--aisb-color-dark-surface, #1f2937);
    --section-text: var(--aisb-color-dark-text, #f9fafb);
    --section-text-muted: var(--aisb-color-dark-text-muted, #9ca3af);
    --section-border: var(--aisb-color-dark-border, #374151);
    --section-primary: var(--aisb-color-primary, #6366f1);
    --section-link: var(--aisb-smart-dark-section-link, var(--aisb-color-primary, #6366f1));
    --section-surface-link: var(--aisb-smart-dark-surface-link, var(--aisb-color-primary, #6366f1));
}

.promptless-content {
    background-color: var(--section-bg);
    color: var(--section-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Headings inside the page-content wrapper inherit the variant text color
 * (they otherwise read --aisb-color-text from style.css's :root rule which
 * is the LIGHT mode color, breaking dark-mode contrast). */
.promptless-content h1,
.promptless-content h2,
.promptless-content h3,
.promptless-content h4,
.promptless-content h5,
.promptless-content h6 {
    color: var(--section-text);
}

/* Form labels inside page content — both WP standard forms and WooCommerce.
 * Without this, labels use the global text color and become invisible against
 * a dark page background. */
.promptless-content label,
.promptless-content legend {
    color: var(--section-text);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--aisb-section-font-heading, inherit);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.5em;
  color: var(--aisb-color-text, #1f2937);
  overflow-wrap: break-word;
  word-break: break-word;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--aisb-color-primary, #6366f1);
  text-decoration: none;
  transition: color 0.2s ease, filter 0.2s ease;
}

/* NOTE: Hover color override intentionally removed.
   The plugin's smart color system handles link colors based on background contrast.
   Forcing a color on hover would break accessibility calculations.
   Underline behavior is handled by .entry-content rules below. */

/* Content links - must be underlined by default for accessibility-ready tag
   WordPress accessibility guidelines require links within content to be underlined
   Excludes: .aisb-btn* (plugin buttons), .button (WooCommerce buttons), .remove (WooCommerce cart remove) */
.entry-content a:not(.aisb-btn):not(.aisb-btn-primary):not(.aisb-btn-secondary):not(.aisb-btn-ghost):not(.button):not(.remove),
.promptless-content p a:not(.aisb-btn):not(.button):not(.remove) {
  text-decoration: underline;
}

.entry-content a:not(.aisb-btn):not(.aisb-btn-primary):not(.aisb-btn-secondary):not(.aisb-btn-ghost):not(.button):not(.remove):hover,
.entry-content a:not(.aisb-btn):not(.aisb-btn-primary):not(.aisb-btn-secondary):not(.aisb-btn-ghost):not(.button):not(.remove):focus,
.promptless-content p a:not(.aisb-btn):not(.button):not(.remove):hover,
.promptless-content p a:not(.aisb-btn):not(.button):not(.remove):focus {
  text-decoration: underline;
}

/* ==========================================================================
   Focus States (Accessibility)
   ========================================================================== */

:focus {
  outline: 2px solid var(--aisb-color-primary, #6366f1);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--aisb-color-primary, #6366f1);
  outline-offset: 2px;
}

/* ==========================================================================
   Images & Media
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

figure {
  margin: 0;
}

/* ==========================================================================
   Lists
   ========================================================================== */

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button {
  cursor: pointer;
}

/* ==========================================================================
   Skip Link (Accessibility)
   ========================================================================== */

.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--aisb-color-primary, #6366f1);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--aisb-section-radius-button, 6px);
  z-index: 999999;
  transition: top 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
}

.skip-link:focus {
  top: 10px;
  outline: 2px solid var(--aisb-color-text, #1f2937);
  outline-offset: 2px;
}

/* ==========================================================================
   Screen Reader Text
   ========================================================================== */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--aisb-color-surface, #f9fafb);
  color: var(--aisb-color-text, #1f2937);
  z-index: 9999;
}

/* ==========================================================================
   Container
   ========================================================================== */

.promptless-container {
  width: 100%;
  max-width: var(--aisb-section-max-width, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .promptless-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .promptless-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.site-main {
  min-height: calc(100vh - 200px);
}

.entry-content {
  max-width: var(--aisb-section-max-width, 1280px);
  margin-left: auto;
  margin-right: auto;
}

.entry-content.alignwide {
  max-width: var(--aisb-section-max-width, 1280px);
}

.entry-content.alignfull {
  max-width: none;
}

/* ==========================================================================
   WordPress Required Classes
   ========================================================================== */

.wp-caption {
  max-width: 100%;
  margin-bottom: 1rem;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--aisb-color-text-muted, #6b7280);
  text-align: center;
  padding: 0.5rem 0;
}

.sticky {
  /* Sticky post styling - inherits standard post styles */
}

.gallery-caption {
  font-size: 0.875rem;
  color: var(--aisb-color-text-muted, #6b7280);
}

.bypostauthor {
  /* Comment author highlighting - inherits standard comment styles */
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Page Header Spacing
   Critical styles that must load on ALL pages (moved from archive.css)
   Ensures Cart, Checkout, and other standard pages have proper heading spacing
   ========================================================================== */

.promptless-page__header {
  padding: var(--aisb-section-space-2xl, 3rem) 0 var(--aisb-section-space-xl, 2rem);
}

.promptless-page__title {
  font-family: var(--aisb-section-font-heading, inherit);
  font-size: var(--aisb-section-text-4xl, 2.5rem);
  font-weight: var(--aisb-section-font-heading-weight, 700);
  color: var(--section-text, var(--aisb-color-text, #1f2937));
  margin: 0;
  line-height: var(--aisb-section-leading-tight, 1.2);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .promptless-page__header {
    padding: var(--aisb-section-space-xl, 2rem) 0 var(--aisb-section-space-lg, 1.5rem);
  }

  .promptless-page__title {
    font-size: var(--aisb-section-text-2xl, 1.75rem);
  }
}

/* ==========================================================================
   Page Content Spacing
   Critical styles that must load on ALL pages (moved from archive.css)
   Ensures proper spacing between content and footer on all pages
   ========================================================================== */

.promptless-page__content {
  padding-bottom: var(--aisb-section-space-2xl, 3rem);
}

@media (max-width: 640px) {
  .promptless-page__content {
    padding-bottom: var(--aisb-section-space-xl, 2rem);
  }
}
