/**
 * AI Templates - Base Template Styles
 * Provides CSS reset and isolation for template content
 */

.ait-template-wrapper {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Full width override for common theme containers */
.ait-template-page .ait-template-wrapper {
    max-width: none;
    width: 100%;
}

/* Reset theme container constraints on ALL ancestor elements
   of .ait-template-wrapper. Elements in header/footer do NOT
   contain .ait-template-wrapper so they are never matched. */
.ait-template-page :has(.ait-template-wrapper) {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hide common theme elements on template pages */
.ait-template-page .page-title,
.ait-template-page .entry-title,
.ait-template-page .page-header,
.ait-template-page .entry-header {
    display: none;
}

/* Ensure images are responsive */
.ait-template-wrapper img {
    max-width: 100%;
    height: auto;
}

/* Reset box-sizing within template */
.ait-template-wrapper *,
.ait-template-wrapper *::before,
.ait-template-wrapper *::after {
    box-sizing: border-box;
}
