/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Fraunces (SIL OFL 1.1, see fonts/Fraunces-OFL.txt), self-hosted because the
   CSP only allows fonts from this origin. Used for headings via font-display. */
@font-face {
    font-family: "Fraunces";
    src: url("/assets/fraunces-latin-wght-normal-0f433db6.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial Narrow', sans-serif
}

@media print {
    .no-print {
        display: none !important;
    }

    .production-sheet {
        max-width: none;
        padding: 0;
    }

    .break-inside-avoid {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.creative-background {
    background-image: url("/assets/creative-background-853b89cf.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    height: 100%;
    width: 100%;
    margin: 0;
    padding-top: 0;
    inset: 0 0 0 0;
}

.nav-logo-img { width: calc(min(42vw, 235px)); }

/* Owner-edited intro/About text (SiteContent): inherit the page's type
   instead of the editor content styles, with simple paragraph spacing. */
.site-content-body .lexxy-content {
    font: inherit;
    color: inherit;
    line-height: inherit;
}

.site-content-body p {
    margin: 0;
}

.site-content-body p + p {
    margin-top: 0.75em;
}

.site-content-body a {
    color: var(--color-mrs-burgundy-500, hsl(5, 38%, 38%));
    text-decoration: underline;
}

/* Links inside rendered rich text (posts, FAQ, Custom Orders) use the brand
   burgundy instead of Lexxy's default blue. */
.prose,
.site-content-body {
    --lexxy-color-link: hsl(5, 38%, 38%);
}

.home-post-card {
    min-height: 275px;
}

.custom-link {
    color: #fff !important;
    font-weight: 750 !important;
}

.custom-link:hover,
.custom-link:focus {
    color: hsl(7, 69%, 65%) !important;
}

.youtube-embed,
.lexxy-content .youtube-embed,
.trix-content .youtube-embed,
.prose .youtube-embed {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #111;
}

.youtube-embed iframe,
.youtube-embed img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

action-text-attachment[content-type="application/vnd.actiontext.youtube"] {
    display: block;
    width: 100%;
    max-width: 100%;
}

action-text-attachment[content-type="application/vnd.actiontext.youtube"] figure,
action-text-attachment[content-type="application/vnd.actiontext.youtube"] img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.75rem;
}

action-text-attachment[content-type="application/vnd.actiontext.youtube"] .youtube-embed::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 4.25rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.7) url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
    pointer-events: none;
}

:where(.lexxy-editor__toolbar-dropdown) {
    :where(.lexxy-editor__toolbar-dropdown-content),
    :where(.lexxy-editor__toolbar-dropdown-list) {
        max-inline-size: fit-content!important;
    }
}

/* Inline "Embed a YouTube video" panel (lexxy_extensions/youtube.js) */
lexxy-toolbar-dropdown .lexxy-youtube-panel[data-dropdown-panel] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    inline-size: 18rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.lexxy-youtube-panel__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
}

.lexxy-youtube-panel__label input {
    display: block;
    width: 100%;
    margin-top: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
}

.lexxy-youtube-panel__label input:focus {
    border-color: hsl(193, 61%, 49%);
}

.lexxy-youtube-panel__error {
    font-size: 0.75rem;
    color: #dc2626;
}

lexxy-toolbar-dropdown .lexxy-youtube-panel .lexxy-youtube-panel__insert {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: auto;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background-color: hsl(193, 61%, 49%);
    border-radius: 9999px;
    cursor: pointer;
}

lexxy-toolbar-dropdown .lexxy-youtube-panel .lexxy-youtube-panel__insert:hover {
    background-color: hsl(193, 61%, 40%);
}

lexxy-editor .attachment[data-content-type="application/vnd.actiontext.youtube"] img,
lexxy-editor figure.attachment--preview img[src*="ytimg.com"] {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
}

.pagy.series-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagy.series-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.1s ease;
    color: #374151;
    background-color: white;
}

.pagy.series-nav a:hover:not([aria-current="page"]):not([aria-disabled="true"]) {
    background-color: hsl(29, 40%, 98%);           /* ue-bronze-100 */
    border-color: hsl(30, 42%, 89%);               /* ue-bronze-200 */
    color: hsl(193, 61%, 32%);                      /* ue-bronze-700 */
}

.pagy.series-nav a[aria-current="page"] {
    background-color: hsl(193, 61%, 49%);           /* ue-bronze-600 */
    color: white;
    border-color: hsl(193, 61%, 63%);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagy.series-nav a[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #9ca3af;
}

/* Prev / Next buttons */
.pagy.series-nav a[aria-label="Previous"],
.pagy.series-nav a[aria-label="Next"] {
    padding: 0 12px;
    font-size: 18px;
    font-weight: 400;
}
/* Shipping & FAQ / Custom Orders: question headings a step below the page
   title (Lexxy's own h2 is 1.5em, which matches the title on phones). */
.site-page-body .lexxy-content h2 {
    font-size: 1.3em;
    margin-block: 1.75em 0.5em;
}

.site-page-body .lexxy-content > :first-child {
    margin-top: 0;
}

/* Current section in the header nav (links carry aria-current="page"). */
nav[aria-label="Global"] a[aria-current="page"],
#mobile-menu a[aria-current="page"] {
    text-decoration-line: underline;
    text-decoration-color: hsl(7, 69%, 82%);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}
