/**
 * ============================================================================
 * GEC Frontend Framework
 * ============================================================================
 *
 * File        : wordpress.css
 * Layer       : 01-base
 * Status      : Production
 *
 * Description:
 * Presentation for the class names WordPress core itself emits — alignment,
 * captions, galleries, comments, pagination and the accessibility helpers.
 *
 * These are not GEC-authored classes, so they are exempt from the `.gec-*`
 * selector policy: WordPress hardcodes the names in core output and in
 * `the_content()`, and the theme cannot rename them.
 *
 * This file exists because the theme is standalone. These rules previously
 * came from the Hello Elementor parent; when that dependency was removed the
 * behaviour was internalized here and re-expressed in GEC tokens.
 *
 * This file MUST NOT:
 * - Style GEC components (use 02-ui)
 * - Style plugin markup (use 03-modules)
 * - Introduce page-specific layout (use 04-pages)
 *
 * ============================================================================
 */


/* ==========================================================================
   01. Accessibility

   `.screen-reader-text` is emitted by core, by the theme's own skip link and
   by WooCommerce. Losing it makes hidden labels render as visible text.
   ========================================================================== */

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    z-index: 100000;
    top: 5px;
    left: 5px;
    display: block;
    width: auto;
    height: auto;
    padding: var(--space-3) var(--space-6);
    clip: auto !important;
    clip-path: none;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: var(--focus-ring);
    font-size: var(--font-size-base);
    line-height: normal;
    text-decoration: none;
}


/* ==========================================================================
   02. Content Alignment

   Emitted by the block editor and the classic editor inside `the_content()`.
   ========================================================================== */

.alignleft {
    float: left;
    margin-inline-end: var(--space-4);
}

.alignright {
    float: right;
    margin-inline-start: var(--space-4);
}

.aligncenter {
    clear: both;
    display: block;
    margin-inline: auto;
}

/* -80px is carried over verbatim from the removed parent theme rather than
 * retuned to a token. `.alignwide` currently determines the width of the
 * global-shell footer on the checkout template, because
 * woocommerce/checkout/form-checkout.php calls get_footer() from inside
 * <main>. Changing this number silently changes checkout layout, so the
 * previous value is preserved and the nesting defect is tracked separately. */
.alignwide {
    margin-inline: -80px;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
}

.alignfull img {
    width: 100vw;
}


/* ==========================================================================
   03. Captions and Galleries
   ========================================================================== */

.wp-caption {
    max-width: 100%;
    margin-block-end: var(--space-5);
}

.wp-caption.alignleft {
    margin: var(--space-1, 0.25rem) var(--space-5) var(--space-5) 0;
}

.wp-caption.alignright {
    margin: var(--space-1, 0.25rem) 0 var(--space-5) var(--space-5);
}

.wp-caption img {
    display: block;
    margin-inline: auto;
}

.wp-caption-text {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.gallery-caption {
    display: block;
    margin: 0;
    padding: var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}


/* ==========================================================================
   04. Post States and Navigation
   ========================================================================== */

.sticky {
    display: block;
    position: relative;
}

.bypostauthor {
    font-size: inherit;
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin: var(--space-5) auto;
}

.post-password-form {
    max-width: 500px;
    margin: var(--space-8, 2rem) auto;
}

.post-password-form p {
    display: flex;
    align-items: flex-end;
    width: 100%;
}

.post-password-form [type="submit"] {
    margin-inline-start: var(--space-1, 0.25rem);
}

.post .entry-title a {
    text-decoration: none;
}

.post .wp-post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

@media (max-width: 991px) {
    .post .wp-post-image {
        max-height: 400px;
    }
}

@media (max-width: 575px) {
    .post .wp-post-image {
        max-height: 300px;
    }
}


/* ==========================================================================
   05. Comments
   ========================================================================== */

#comments .comment-list {
    margin: 0;
    padding: 0;
    font-size: var(--font-size-sm);
    list-style: none;
}

#comments .comment,
#comments .pingback {
    position: relative;
}

#comments .comment .comment-body,
#comments .pingback .comment-body {
    display: flex;
    flex-direction: column;
    padding-block: var(--space-6);
    padding-inline: var(--space-10, 3.75rem) 0;
    border-block-end: var(--border-width) var(--border-style) var(--color-border);
}

#comments .comment .avatar,
#comments .pingback .avatar {
    position: absolute;
    left: 0;
    margin-inline-end: var(--space-3);
    border-radius: 50%;
}

#comments .comment-meta {
    display: flex;
    justify-content: space-between;
    margin-block-end: var(--space-3);
}

#comments .comment-metadata,
#comments .reply {
    font-size: var(--font-size-xs, 0.75rem);
    line-height: 1;
}

#comments .children {
    position: relative;
    margin: 0;
    padding-inline-start: var(--space-6);
    list-style: none;
}

#comments .children li:last-child {
    padding-block-end: 0;
}

@media (max-width: 767px) {
    #comments .comment .comment-body {
        padding: var(--space-6) 0;
    }

    #comments .children {
        padding-inline-start: var(--space-5);
    }

    #comments .comment .avatar {
        position: inherit;
        float: left;
    }
}


/* ==========================================================================
   06. Utility
   ========================================================================== */

.hide {
    display: none !important;
}


/* ==========================================================================
   End of File
   ========================================================================== */
