/**
 * HVAC Community Events - Core Consolidated CSS (FIXED)
 * Contains essential styles loaded on all plugin pages
 * 
 * @requires hvac-design-system.css
 * @version 2.0.0 - Fixed syntax errors and harmonized with design system
 * @since 2025-08-21
 */

/* Import design system tokens */
@import url('./hvac-design-system.css');

/* ===== PAGE TITLE HIDING ===== */

/* Hide page titles on HVAC pages - consistent across all themes */
.hvac-page .entry-title,
.hvac-page .page-title,
.hvac-page h1.entry-title,
.hvac-page h1.page-title,
.hvac-no-title .entry-title,
.hvac-no-title .page-title,
.entry-title-hidden .entry-title,
.entry-title-hidden .page-title {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Also hide common theme title wrappers */
.hvac-page .page-header,
.hvac-page .entry-header .entry-title,
.hvac-page header.entry-header h1,
.hvac-page .title-area h1,
.hvac-page .ast-single-post-title,
.hvac-page .ast-page-title {
  display: none !important;
}

/* Fix for Astra theme specifically */
.hvac-page .site-content {
  padding-top: var(--hvac-space-8);
  padding-bottom: var(--hvac-space-8);
}

.hvac-page .entry-header {
  display: none !important;
}

/* ===== LAYOUT FOUNDATION ===== */

/* Main content container */
.hvac-content {
  max-width: var(--hvac-container-max-width);
  margin: 0 auto;
  padding: var(--hvac-container-padding);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--hvac-text-base);
  line-height: var(--hvac-leading-normal);
  color: var(--hvac-neutral-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure proper spacing on all HVAC pages */
.hvac-page .site-content {
  padding-top: var(--hvac-space-8);
  padding-bottom: var(--hvac-space-8);
}

/* ===== TYPOGRAPHY ===== */

.hvac-content h1,
.hvac-content h2,
.hvac-content h3,
.hvac-content h4 {
  color: var(--hvac-neutral-900);
  font-weight: var(--hvac-font-semibold);
  margin-bottom: var(--hvac-space-4);
  line-height: var(--hvac-leading-tight);
}

.hvac-content h1 {
  font-size: var(--hvac-text-3xl);
  font-weight: var(--hvac-font-bold);
  margin-bottom: var(--hvac-space-6);
}

.hvac-content h2 {
  font-size: var(--hvac-text-2xl);
  margin-top: var(--hvac-space-8);
  margin-bottom: var(--hvac-space-4);
}

.hvac-content h3 {
  font-size: var(--hvac-text-xl);
  margin-top: var(--hvac-space-6);
  margin-bottom: var(--hvac-space-3);
}

.hvac-content h4 {
  font-size: var(--hvac-text-lg);
  font-weight: var(--hvac-font-medium);
  margin-top: var(--hvac-space-5);
  margin-bottom: var(--hvac-space-2);
}

.hvac-content p {
  margin-bottom: var(--hvac-space-4);
  line-height: var(--hvac-leading-relaxed);
  color: var(--hvac-neutral-700);
}

/* ===== BUTTON STYLES ===== */

.hvac-button,
.hvac-content .button,
.hvac-content button[type="submit"],
.hvac-content input[type="submit"],
.hvac-content .ast-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--hvac-primary-500);
  color: var(--hvac-neutral-0) !important;
  padding: var(--hvac-button-padding-base);
  border: none;
  border-radius: var(--hvac-button-radius);
  font-size: var(--hvac-text-base);
  font-weight: var(--hvac-font-medium);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all var(--hvac-button-transition);
  box-shadow: var(--hvac-button-shadow);
  line-height: 1;
  min-height: var(--hvac-touch-target);
  position: relative;
  overflow: hidden;
}

.hvac-button:hover,
.hvac-content .button:hover,
.hvac-content button[type="submit"]:hover,
.hvac-content input[type="submit"]:hover,
.hvac-content .ast-button:hover {
  background-color: var(--hvac-primary-600);
  color: var(--hvac-neutral-0) !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--hvac-shadow-md);
}

.hvac-button:active,
.hvac-content .button:active,
.hvac-content button[type="submit"]:active,
.hvac-content input[type="submit"]:active,
.hvac-content .ast-button:active {
  background-color: var(--hvac-primary-700);
  transform: translateY(0);
  box-shadow: var(--hvac-shadow-sm);
}

.hvac-button:focus,
.hvac-content .button:focus,
.hvac-content button[type="submit"]:focus,
.hvac-content input[type="submit"]:focus,
.hvac-content .ast-button:focus {
  outline: none;
  box-shadow: var(--hvac-focus-ring), var(--hvac-button-shadow);
}

/* Secondary buttons */
.hvac-button-secondary,
.hvac-content .button-secondary {
  background-color: var(--hvac-neutral-0);
  color: var(--hvac-primary-500) !important;
  border: 1px solid var(--hvac-primary-500);
}

.hvac-button-secondary:hover,
.hvac-content .button-secondary:hover {
  background-color: var(--hvac-primary-50);
  border-color: var(--hvac-primary-600);
  color: var(--hvac-primary-600) !important;
}

/* ===== FORM ELEMENTS ===== */

.hvac-content input[type="text"],
.hvac-content input[type="email"],
.hvac-content input[type="password"],
.hvac-content input[type="tel"],
.hvac-content input[type="url"],
.hvac-content input[type="search"],
.hvac-content input[type="number"],
.hvac-content input[type="date"],
.hvac-content input[type="datetime-local"],
.hvac-content textarea,
.hvac-content select {
  width: 100%;
  padding: var(--hvac-input-padding);
  font-size: var(--hvac-text-base);
  line-height: var(--hvac-leading-normal);
  color: var(--hvac-neutral-900);
  background-color: var(--hvac-neutral-0);
  border: var(--hvac-input-border);
  border-radius: var(--hvac-input-radius);
  box-shadow: var(--hvac-input-shadow);
  transition: border-color var(--hvac-transition-fast), box-shadow var(--hvac-transition-fast);
}

.hvac-content input:focus,
.hvac-content textarea:focus,
.hvac-content select:focus {
  outline: none;
  border-color: var(--hvac-primary-500);
  box-shadow: var(--hvac-input-focus-ring);
}

/* ===== LINKS ===== */

.hvac-content a {
  color: var(--hvac-primary-500);
  text-decoration: underline;
  transition: color var(--hvac-transition-fast);
}

.hvac-content a:hover {
  color: var(--hvac-primary-600);
  text-decoration: none;
}

.hvac-content a:focus {
  outline: none;
  box-shadow: var(--hvac-focus-ring);
  border-radius: var(--hvac-radius-sm);
}

/* ===== LISTS ===== */

.hvac-content ul,
.hvac-content ol {
  padding-left: var(--hvac-space-6);
  margin-bottom: var(--hvac-space-4);
}

.hvac-content li {
  margin-bottom: var(--hvac-space-2);
  line-height: var(--hvac-leading-relaxed);
  color: var(--hvac-neutral-700);
}

/* ===== TABLES ===== */

.hvac-content table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--hvac-neutral-0);
  border-radius: var(--hvac-radius-base);
  box-shadow: var(--hvac-shadow-base);
  overflow: hidden;
  margin-bottom: var(--hvac-space-6);
}

.hvac-content table th,
.hvac-content table td {
  padding: var(--hvac-table-padding);
  text-align: left;
  border-bottom: var(--hvac-table-border);
}

.hvac-content table th {
  background-color: var(--hvac-neutral-50);
  font-weight: var(--hvac-font-semibold);
  color: var(--hvac-neutral-900);
  font-size: var(--hvac-text-sm);
}

.hvac-content table tbody tr:hover {
  background-color: var(--hvac-neutral-50);
}

/* ===== UTILITY CLASSES ===== */

/* Hide elements */
.hvac-hidden {
  display: none !important;
}

.hvac-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Text utilities */
.hvac-text-center {
  text-align: center;
}

.hvac-text-right {
  text-align: right;
}

.hvac-text-left {
  text-align: left;
}

/* Color utilities */
.hvac-text-primary {
  color: var(--hvac-primary-500);
}

.hvac-text-success {
  color: var(--hvac-success-600);
}

.hvac-text-warning {
  color: var(--hvac-warning-600);
}

.hvac-text-error {
  color: var(--hvac-error-600);
}

.hvac-text-muted {
  color: var(--hvac-neutral-500);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile-first approach */
@media (max-width: 767px) {
  .hvac-content {
    padding: var(--hvac-space-4);
  }
  
  .hvac-content h1 {
    font-size: var(--hvac-text-2xl);
  }
  
  .hvac-content h2 {
    font-size: var(--hvac-text-xl);
  }
  
  .hvac-content h3 {
    font-size: var(--hvac-text-lg);
  }
  
  .hvac-button,
  .hvac-content .button,
  .hvac-content button[type="submit"],
  .hvac-content input[type="submit"] {
    width: 100%;
    justify-content: center;
  }
  
  .hvac-content table {
    font-size: var(--hvac-text-sm);
  }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
  .hvac-content {
    padding: var(--hvac-space-6);
  }
}

/* Desktop styles */
@media (min-width: 1024px) {
  .hvac-content {
    padding: var(--hvac-space-8);
  }
}

/* ===== PRINT STYLES ===== */

@media print {
  .hvac-content {
    color: black !important;
    background: white !important;
  }
  
  .hvac-button,
  .hvac-content .button {
    display: none !important;
  }
  
  .hvac-content a {
    color: black !important;
    text-decoration: underline !important;
  }
  
  .hvac-content a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: var(--hvac-text-sm);
  }
}

/* ===== ACCESSIBILITY ===== */

/* Focus styles for keyboard navigation */
.hvac-content *:focus {
  outline: none;
  box-shadow: var(--hvac-focus-ring);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hvac-content {
    --hvac-shadow-base: 0 0 0 1px currentColor;
    --hvac-shadow-md: 0 0 0 2px currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hvac-content *,
  .hvac-content *::before,
  .hvac-content *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}