/* =========================================================
   WP LABEL GENERATOR
   CLEAN RESPONSIVE FRONTEND CSS
   Homemade Texas
========================================================= */


/* =========================================================
   ROOT
========================================================= */

:root {
    --wpgl-primary: #066aab;
    --wpgl-primary-hover: #055887;

    --wpgl-blue: #2563eb;

    --wpgl-heading: #0f172a;
    --wpgl-text: #64748b;

    --wpgl-border: #e2e8f0;
    --wpgl-border-light: #edf2f7;

    --wpgl-bg: #f8fafc;
    --wpgl-card: #ffffff;

    --wpgl-radius: 18px;

    --wpgl-shadow:
        0 12px 40px rgba(15, 23, 42, .08);
}


/* =========================================================
   GLOBAL
========================================================= */

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

.wpgl-page {
    width: 100%;
    max-width: 1500px;

    margin: 40px auto;
    padding: 0 28px;

    color: var(--wpgl-heading);
}


/* =========================================================
   ALLERGEN FREE
========================================================= */

.wpgl-allergen-free {
    color: #15803d !important;
    font-weight: 700 !important;
}


/* =========================================================
   HEADER
========================================================= */

.wpgl-header {
    margin-bottom: 30px;
}

.wpgl-header h1 {
    margin: 0;

    font-size: 42px;
    line-height: 1.1;

    font-weight: 800;
    letter-spacing: -1px;
}

.wpgl-header p {
    margin: 10px 0 0;

    max-width: 700px;

    font-size: 16px;
    line-height: 1.6;

    color: var(--wpgl-text);
}


/* =========================================================
   MAIN GRID
========================================================= */

.wpgl-wrapper {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 28px;

    align-items: start;
}


/* =========================================================
   CARDS
========================================================= */

.wpgl-card {
    width: 100%;
    min-width: 0;

    background: var(--wpgl-card);

    border:
        1px solid var(--wpgl-border);

    border-radius: var(--wpgl-radius);

    box-shadow: var(--wpgl-shadow);

    overflow: hidden;
}

.wpgl-card-header {
    padding: 22px 26px;

    background:
        linear-gradient(
            #ffffff,
            #f8fafc
        );

    border-bottom:
        1px solid var(--wpgl-border-light);
}

.wpgl-card-header h2 {
    margin: 0;

    font-size: 21px;
    line-height: 1.25;

    font-weight: 700;
}

.wpgl-card-header p {
    margin: 6px 0 0;

    font-size: 14px;
    line-height: 1.5;

    color: var(--wpgl-text);
}

.wpgl-card-body {
    padding: 26px;
}


/* =========================================================
   FORM CARD
========================================================= */

.wpgl-form-card {
    min-width: 0;
}

.wpgl-form-card .wpforms-container {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
}

.wpgl-form-card form {
    width: 100%;
    margin: 0;
}

.wpgl-form-card .wpforms-field {
    width: 100%;

    margin-bottom: 20px !important;
}

.wpgl-form-card .wpforms-field:last-child {
    margin-bottom: 0 !important;
}


/* =========================================================
   FORM LABELS
========================================================= */

.wpgl-form-card .wpforms-field-label {
    display: block;

    margin-bottom: 8px !important;

    font-size: 14px;
    line-height: 1.4;

    font-weight: 700;

    color: #334155;
}


/* =========================================================
   FORM INPUTS
========================================================= */

.wpgl-form-card input[type="text"],
.wpgl-form-card input[type="email"],
.wpgl-form-card input[type="tel"],
.wpgl-form-card input[type="number"],
.wpgl-form-card input[type="url"],
.wpgl-form-card textarea,
.wpgl-form-card select {
    width: 100% !important;

    min-height: 52px;

    padding: 13px 16px !important;

    border:
        1px solid #dbe3ee !important;

    border-radius: 12px !important;

    background: #ffffff !important;

    color: #0f172a !important;

    font-size: 15px !important;
    line-height: 1.4;

    box-shadow: none !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.wpgl-form-card textarea {
    min-height: 115px;

    resize: vertical;
}

.wpgl-form-card input::placeholder,
.wpgl-form-card textarea::placeholder {
    color: #94a3b8;
}

.wpgl-form-card input:focus,
.wpgl-form-card textarea:focus,
.wpgl-form-card select:focus {
    outline: none;

    border-color:
        var(--wpgl-primary) !important;

    box-shadow:
        0 0 0 4px
        rgba(6, 106, 171, .10) !important;
}


/* =========================================================
   FORM DESCRIPTION / ERRORS
========================================================= */

.wpgl-form-card .wpforms-field-description {
    margin-top: 7px;

    font-size: 13px;
    line-height: 1.5;

    color: #64748b;
}

.wpgl-form-card input.wpforms-error,
.wpgl-form-card textarea.wpforms-error,
.wpgl-form-card select.wpforms-error {
    border-color: #ef4444 !important;

    box-shadow:
        0 0 0 4px
        rgba(239, 68, 68, .08) !important;
}

.wpgl-form-card label.wpforms-error {
    margin-top: 7px !important;

    font-size: 13px;

    color: #ef4444 !important;
}


/* =========================================================
   RADIO / CHECKBOX
========================================================= */

.wpgl-form-card ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.wpgl-form-card li {
    margin-bottom: 8px;
}

.wpgl-form-card input[type="checkbox"],
.wpgl-form-card input[type="radio"] {
    margin-right: 8px;
}


/* =========================================================
   HIDE WPForms SUBMIT
========================================================= */

.wpgl-form-card .wpforms-submit-container,
.wpgl-form-card .wpgl-confirmation {
    display: none !important;
}


/* =========================================================
   TEMPLATE SELECT
========================================================= */

.wpgl-template {
    width: 100%;

    margin-bottom: 16px;
}

.wpgl-template label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 700;

    color: #334155;
}

#wpgl-template-select {
    width: 100% !important;

    height: 52px !important;
    min-height: 52px !important;

    padding: 0 16px !important;

    border:
        1px solid #dbe3ee !important;

    border-radius: 12px !important;

    background: #ffffff !important;

    color: #0f172a !important;

    font-family:
        Inter,
        system-ui,
        sans-serif !important;

    font-size: 15px !important;
    font-weight: 500 !important;

    cursor: pointer;

    outline: none !important;

    box-shadow: none !important;
}

#wpgl-template-select:hover {
    border-color: #93c5fd !important;
}

#wpgl-template-select:focus {
    border-color:
        var(--wpgl-primary) !important;

    box-shadow:
        0 0 0 4px
        rgba(6, 106, 171, .10) !important;
}

#wpgl-template-select option {
    background: #ffffff !important;
    color: #0f172a !important;
}


/* =========================================================
   PREVIEW CARD
========================================================= */

.wpgl-preview-card {
    position: sticky;

    top: 24px;
}

.wpgl-preview-card .wpgl-card-body {
    padding: 18px;
}


/* =========================================================
   PREVIEW AREA
========================================================= */

.wpgl-preview-area {
    width: 100%;
    min-width: 0;
}

.wpgl-preview-workspace {
    width: 100%;
    min-width: 0;

    padding: 16px;

    border:
        1px solid #e5e7eb;

    border-radius: 15px;

    display: flex;

    justify-content: center;
    align-items: flex-start;

    overflow: hidden;

    background: #f8fafc;

    background-image:
        linear-gradient(
            45deg,
            #eef2f7 25%,
            transparent 25%
        ),
        linear-gradient(
            -45deg,
            #eef2f7 25%,
            transparent 25%
        ),
        linear-gradient(
            45deg,
            transparent 75%,
            #eef2f7 75%
        ),
        linear-gradient(
            -45deg,
            transparent 75%,
            #eef2f7 75%
        );

    background-size: 20px 20px;

    background-position:
        0 0,
        0 10px,
        10px -10px,
        -10px 0;
}


/* =========================================================
   PREVIEW STAGE
========================================================= */

.wpgl-preview-stage {
    width: 100%;

    display: flex;

    justify-content: center;
    align-items: flex-start;
}

.wpgl-preview-scale {
    width: 100%;
    max-width: 100%;

    display: flex;

    justify-content: center;
    align-items: flex-start;

    transform: none !important;

    transform-origin: top center;
}


/* =========================================================
   PAPER
========================================================= */

.wpgl-paper {
    width: 100%;
    max-width: 100%;

    min-width: 0;

    flex-shrink: 1;
}


/* =========================================================
   LIVE LABEL
========================================================= */

.wpgl-label {
    width: 100%;

    /*
     * IMPORTANT:
     * Do not allow the live preview to stretch vertically.
     */
    height: auto !important;
    min-height: 0 !important;

    background: #ffffff;

    display: flex;

    flex-direction: column;

    padding:
        16px 18px 10px;

    color: #111827;

    overflow: hidden;

    border:
        1px solid #dfe3e8;

    border-radius: 10px;

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, .07);
}


/* =========================================================
   LABEL HEADER
========================================================= */

.wpgl-label-header {
    width: 100%;

    flex: 0 0 auto;

    text-align: center;
}

.wpgl-product,
.wpgl-business,
.wpgl-address {
    width: 100%;

    text-align: center;

    flex: 0 0 auto;
}

.wpgl-product .wpgl-preview-value {
    margin: 0;

    font-size: 24px;
    line-height: 1.05;

    font-weight: 800;

    letter-spacing: -.5px;

    color: #172033;

    overflow-wrap: anywhere;
}

.wpgl-business {
    margin-top: 3px;
}

.wpgl-business .wpgl-preview-value {
    margin: 0;

    font-size: 16px;
    line-height: 1.1;

    font-weight: 700;

    color: #066aab;

    overflow-wrap: anywhere;
}

.wpgl-address {
    margin-top: 2px;
}

.wpgl-address .wpgl-preview-value {
    margin: 0;

    font-size: 12px;
    line-height: 1.15;

    color: #64748b;

    overflow-wrap: anywhere;
}


/* =========================================================
   DIVIDER
========================================================= */

.wpgl-label-divider {
    width: 100%;

    height: 1px;

    flex: 0 0 auto;

    margin:
        8px 0 6px;

    background: #d9dee5;

    border: 0;
}


/* =========================================================
   LABEL BODY
========================================================= */

.wpgl-label-body {
    width: 100%;

    /*
     * IMPORTANT:
     * No flex: 1 here.
     * Content should determine its own height.
     */
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 0;
    margin: 0;
    padding: 0;
    text-align: center;
}

.wpgl-section {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: center;
    margin-top: 5px;
}

.wpgl-section-title {
    margin: 0 0 2px;

    font-size: 11px;
    line-height: 1;

    font-weight: 800;

    letter-spacing: 1.4px;

    text-transform: uppercase;

    color: #2563eb;

    text-align: center;
}

.wpgl-section-content {
    width: 100%;

    margin: 0;
    padding: 0;

    text-align: center;
}

.wpgl-section-content .wpgl-preview-value {
    margin: 0;

    font-size: 14px;
    line-height: 1.2;

    color: #1f2937;

    text-align: center;

    overflow-wrap: anywhere;
    word-break: normal;
}


/* =========================================================
   REQUIRED STATEMENT
========================================================= */

.wpgl-required-statement {
    width: 100%;

    margin:
        6px 0 0;

    padding: 0 5px;

    text-align: center;

    font-size: 9px;
    line-height: 1.08;

    font-weight: 700;

    color: #334155;

    overflow-wrap: anywhere;
}


/* =========================================================
   TCS STATEMENT
========================================================= */

.wpgl-tcs-statement {
    width: 100%;

    margin:
        3px 0 0;

    padding: 0 5px;

    text-align: center;

    font-size: 9px;
    line-height: 1.08;

    color: #334155;

    overflow-wrap: anywhere;
}


/* =========================================================
   FOOTER
========================================================= */

.wpgl-label-footer {
    width: 100%;

    flex: 0 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    align-items: center;

    column-gap: 8px;

    margin:
        7px 0 0;

    padding:
        5px 0 0;

    border-top:
        1px solid #d9dee5;
}

.wpgl-footer-item {
    min-width: 0;

    display: flex;

    flex-direction: row;

    align-items: baseline;

    gap: 3px;

    margin: 0;
    padding: 0;

    white-space: nowrap;

    text-align: left;
}

.wpgl-footer-item.right {
    justify-content: flex-end;

    text-align: right;
}

.wpgl-footer-title {
    display: inline-block;

    margin: 0;
    padding: 0;

    font-size: 10px;
    line-height: 1;

    font-weight: 800;

    letter-spacing: .7px;

    color: #64748b;

    white-space: nowrap;
}

.wpgl-footer-value {
    display: inline-block;

    min-width: 0;

    margin: 0;
    padding: 0;
}

.wpgl-footer-value .wpgl-preview-value {
    display: inline;

    margin: 0;
    padding: 0;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    color: #172033;

    white-space: nowrap;
}


/* =========================================================
   HOMEMADE TEXAS BRANDING
========================================================= */

.wpgl-branding {
    width: 100%;
    flex: 0 0 auto;
    margin: 5px 0 0;
    padding: 0;
    text-align: center;
    font-size: 9px;
    line-height: 1.1;
    color: #94a3b8;
}

.wpgl-branding a {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
}

.wpgl-branding a:hover {
    text-decoration: underline;
}

/* =========================================================
   BUTTONS
========================================================= */

.wpgl-buttons {
    width: 100%;

    display: flex;

    gap: 10px;

    margin-top: 16px;
}

.wpgl-btn {
    flex: 1 1 0;

    min-width: 0;

    height: 48px;

    padding: 0 14px;

    border:
        1px solid #dbe3ee;

    border-radius: 11px;

    background: #ffffff;

    color: #334155;

    font-size: 14px;
    line-height: 1.2;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.wpgl-btn:hover {
    transform:
        translateY(-1px);

    border-color:
        var(--wpgl-primary);
}

.wpgl-btn-primary {
    background:
        var(--wpgl-primary);

    color: #ffffff;

    border-color:
        var(--wpgl-primary);
}

.wpgl-btn-primary:hover {
    background:
        var(--wpgl-primary-hover);

    border-color:
        var(--wpgl-primary-hover);
}

.wpgl-btn br {
    display: none;
}

.wpgl-btn:focus,
.wpgl-btn:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 4px
        rgba(6, 106, 171, .12);
}


/* =========================================================
   PREVIEW NOTE
========================================================= */

.wpgl-preview-note {
    margin:
        12px 0 0;

    text-align: center;

    font-size: 12px;
    line-height: 1.45;

    color: #64748b;
}


/* =========================================================
   THEME BUTTON OVERRIDE
========================================================= */

.wpgl-page
button[type="button"]:hover,
.wpgl-page
button[type="submit"]:hover {
    background-color:
        var(--wpgl-primary);
}


/* =========================================================
   EXPORT BASE
========================================================= */

.wpgl-export,
.wpgl-export * {
    box-sizing: border-box !important;
}

.wpgl-export {
    position: relative !important;

    background: #ffffff !important;

    overflow: hidden !important;
}


/* =========================================================
   AVERY 5163
   EXACT 4" × 2"
========================================================= */

.wpgl-export.wpgl-template-5163 {
    width: 4in !important;
    height: 2in !important;

    margin: 0 !important;

    padding:
        4px 9px 2px !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;

    border:
        1px dashed #cbd5e1 !important;

    border-radius: 4px !important;

    background: #ffffff !important;
}


/* =========================================================
   EXPORT LABEL
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-label {
    width: 100% !important;

    height: 100% !important;

    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;

    border: none !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    background: transparent !important;
}


/* =========================================================
   EXPORT HEADER
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-label-header {
    width: 100% !important;

    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: center !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-product {
    margin: 0 !important;
    padding: 0 !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-product .wpgl-preview-value {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 18px !important;
    line-height: 1.02 !important;

    font-weight: 800 !important;

    white-space: nowrap !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    color: #0f172a !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-business {
    margin: 1px 0 0 !important;
    padding: 0 !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-business .wpgl-preview-value {
    margin: 0 !important;

    font-size: 12px !important;
    line-height: 1.02 !important;

    font-weight: 700 !important;

    color: #c2410c !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-address {
    margin: 1px 0 0 !important;
    padding: 0 !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-address .wpgl-preview-value {
    margin: 0 !important;

    font-size: 8.5px !important;
    line-height: 1.05 !important;

    color: #64748b !important;
}


/* =========================================================
   EXPORT DIVIDER
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-label-divider {
    width: 100% !important;

    height: 1px !important;

    flex: 0 0 auto !important;

    margin:
        2px 0 !important;

    background:
        #e2e8f0 !important;

    border: none !important;
}


/* =========================================================
   EXPORT BODY
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-label-body {
    width: 100% !important;

    /*
     * Keep content compact.
     */
    flex: 0 0 auto !important;

    display: flex !important;

    flex-direction: column !important;

    justify-content: flex-start !important;

    align-items: stretch !important;

    gap: 2px !important;

    margin: 0 !important;

    padding: 0 !important;

    min-height: 0 !important;

    overflow: hidden !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-section {
    width: 100% !important;

    display: flex !important;

    flex-direction: row !important;

    align-items: flex-start !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: left !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-section-title {
    flex:
        0 0 65px !important;

    margin: 0 !important;

    padding:
        0 3px 0 0 !important;

    font-size: 7.5px !important;
    line-height: 1.1 !important;

    font-weight: 800 !important;

    color: #2563eb !important;

    text-align: left !important;

    white-space: normal !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-section-content {
    flex:
        1 1 auto !important;

    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: left !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-section-content
.wpgl-preview-value {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 7.5px !important;
    line-height: 1.1 !important;

    color: #1e293b !important;

    text-align: left !important;

    white-space: normal !important;

    overflow-wrap: anywhere !important;

    word-break: break-word !important;
}


/* =========================================================
   EXPORT REQUIRED STATEMENT
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-required-statement {
    width: 100% !important;
    margin: 3px 0 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-size: 5.8px !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
    color: #334155 !important;
    overflow-wrap: anywhere !important;
    line-height: 1.3em;
}


/* =========================================================
   EXPORT TCS STATEMENT
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-tcs-statement {
    width: 100% !important;

    margin:
        1px 0 0 !important;

    padding:
        0 4px !important;

    text-align: center !important;

    font-size: 5.6px !important;
    line-height: 1.05 !important;

    color: #334155 !important;

    overflow-wrap: anywhere !important;
}


/* =========================================================
   EXPORT FOOTER
========================================================= */

.wpgl-export.wpgl-template-5163 .wpgl-label-footer {
    width: 100% !important;
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 5px !important;
    margin: 4px 0 0 !important;
    padding: 3px 0 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    transform: translateY(-3px) !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-footer-item {
    min-width: 0 !important;

    display: flex !important;

    flex-direction: row !important;

    align-items: baseline !important;

    gap: 3px !important;

    margin: 0 !important;
    padding: 0 !important;

    white-space: nowrap !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-footer-item.right {
    justify-content: flex-end !important;

    text-align: right !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-footer-title {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 8px !important;
    line-height: 1 !important;

    letter-spacing: .7px !important;

    font-weight: 800 !important;

    color: #64748b !important;

    white-space: nowrap !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-footer-value {
    margin: 0 !important;
    padding: 0 !important;

    min-width: 0 !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-footer-value
.wpgl-preview-value {
    display: inline !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 7.5px !important;
    line-height: 1 !important;

    font-weight: 700 !important;

    color: #0f172a !important;

    white-space: nowrap !important;
}


/* =========================================================
   EXPORT HOMEMADE TEXAS BRANDING
========================================================= */

.wpgl-export.wpgl-template-5163
.wpgl-branding {
    width: 100% !important;

    flex: 0 0 auto !important;

    margin:
        3px 0 0 !important;

    padding: 0 !important;

    text-align: center !important;

    font-size: 4.5px !important;
    line-height: 1 !important;

    color: #94a3b8 !important;
}

.wpgl-export.wpgl-template-5163
.wpgl-branding a {
    color: #64748b !important;

    text-decoration: none !important;

    font-weight: 600 !important;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1100px) {

    .wpgl-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .wpgl-wrapper {
        gap: 20px;
    }

    .wpgl-header h1 {
        font-size: 36px;
    }
}


/* =========================================================
   RESPONSIVE — SINGLE COLUMN
========================================================= */

@media (max-width: 900px) {

    .wpgl-wrapper {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .wpgl-preview-card {
        position: static;

        top: auto;
    }

    .wpgl-form-card,
    .wpgl-preview-card {
        width: 100%;

        min-width: 0;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 640px) {

    .wpgl-page {
        margin: 24px auto;

        padding:
            0 12px;
    }

    .wpgl-header {
        margin-bottom: 22px;
    }

    .wpgl-header h1 {
        font-size: 30px;

        letter-spacing: -.5px;
    }

    .wpgl-header p {
        font-size: 14px;

        line-height: 1.55;
    }

    .wpgl-card {
        border-radius: 14px;
    }

    .wpgl-card-header {
        padding:
            18px;
    }

    .wpgl-card-header h2 {
        font-size: 19px;
    }

    .wpgl-card-body {
        padding:
            18px;
    }

    .wpgl-preview-card
    .wpgl-card-body {
        padding:
            12px;
    }

    .wpgl-preview-workspace {
        padding:
            10px;

        border-radius:
            12px;
    }

    .wpgl-label {
        padding:
            14px 14px 9px;

        min-height:
            0 !important;
    }

    .wpgl-product
    .wpgl-preview-value {
        font-size: 20px;
    }

    .wpgl-business
    .wpgl-preview-value {
        font-size: 14px;
    }

    .wpgl-address
    .wpgl-preview-value {
        font-size: 10px;
    }

    .wpgl-label-body {
        gap: 5px;
    }

    .wpgl-section-content
    .wpgl-preview-value {
        font-size: 12px;
    }

    .wpgl-section-title {
        font-size: 10px;

        letter-spacing:
            1.2px;
    }

    .wpgl-required-statement {
        font-size: 8px;

        margin-top:
            5px;
    }

    .wpgl-tcs-statement {
        font-size: 8px;

        margin-top:
            2px;
    }

    .wpgl-label-footer {
        margin-top:
            6px;

        padding-top:
            4px;
    }

    .wpgl-footer-title {
        font-size: 9px;
    }

    .wpgl-footer-value
    .wpgl-preview-value {
        font-size: 9px;
    }

    .wpgl-branding {
        margin-top:
            4px;

        font-size: 7px;
    }

    .wpgl-buttons {
        flex-direction: column;

        gap: 8px;
    }

    .wpgl-btn {
        width: 100%;

        flex:
            0 0 auto;
    }
}


/* =========================================================
   RESPONSIVE — VERY SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .wpgl-page {
        padding:
            0 8px;
    }

    .wpgl-card-body {
        padding:
            14px;
    }

    .wpgl-preview-card
    .wpgl-card-body {
        padding:
            8px;
    }

    .wpgl-preview-workspace {
        padding:
            7px;
    }

    .wpgl-label {
        padding:
            12px 10px 8px;
    }

    .wpgl-product
    .wpgl-preview-value {
        font-size: 18px;
    }

    .wpgl-business
    .wpgl-preview-value {
        font-size: 13px;
    }

    .wpgl-address
    .wpgl-preview-value {
        font-size: 9px;
    }

    .wpgl-label-body {
        gap: 4px;
    }

    .wpgl-section-content
    .wpgl-preview-value {
        font-size: 11px;
    }

    .wpgl-label-footer {
        column-gap:
            5px;
    }

    .wpgl-footer-item {
        gap:
            2px;
    }

    .wpgl-footer-title {
        font-size: 8px;
    }

    .wpgl-footer-value
    .wpgl-preview-value {
        font-size: 8px;
    }

    .wpgl-branding {
        font-size: 6px;
    }
}


/* =========================================================
   WORDPRESS ALIGNMENT RESET
========================================================= */

.wpgl-page .alignwide {
    margin-inline: 0;
}


/* =========================================================
   WP AUTOP CLEANUP — PREVIEW ONLY
   ========================================================= */

/* WordPress-generated paragraph wrappers around comments/spacing */
.wpgl-label > p,
.wpgl-label-header > p,
.wpgl-product > p,
.wpgl-business > p,
.wpgl-address > p,
.wpgl-label-body > p,
.wpgl-section > p,
.wpgl-section-content > p,
.wpgl-label-footer > p,
.wpgl-footer-item > p,
.wpgl-footer-value > p,
.wpgl-branding > p:empty {
    display: none !important;
}


/* Remove unwanted paragraph spacing inside actual content */
.wpgl-label p {
    margin: 0 !important;
    padding: 0 !important;
}


/* Keep actual statement paragraphs visible */
.wpgl-required-statement > p,
.wpgl-tcs-statement > p {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* =========================================================
   AVERY 5163 — EXPORT SECTION TITLES
   PDF / PNG / PRINT
   ========================================================= */

.wpgl-export.wpgl-template-5163 .wpgl-label-body .wpgl-section {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}


.wpgl-export.wpgl-template-5163 .wpgl-label-body .wpgl-section-title {
    display: block !important;

    width: 100% !important;
    flex: none !important;

    margin: 0 0 2px 0 !important;
    padding: 0 !important;

    text-align: center !important;

    font-size: 8.5px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;

    white-space: nowrap !important;
}


.wpgl-export.wpgl-template-5163 .wpgl-label-body .wpgl-section-content {
    display: block !important;

    width: 100% !important;
    flex: none !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: center !important;
}


.wpgl-export.wpgl-template-5163
.wpgl-label-body
.wpgl-section-content
.wpgl-preview-value {
    display: block !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: center !important;

    font-size: 7.5px !important;
    line-height: 1.1 !important;
}









/* =========================================================
   AVERY 5164 — INGREDIENTS / CONTAINS
   Keep title + content on the same line
   ========================================================= */

.wpgl-export.wpgl-template-5164 .wpgl-section {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 5px !important;
    padding: 0 !important;
    text-align: center !important;
}

.wpgl-export.wpgl-template-5164 .wpgl-section-title {
    display: block !important;
    width: 100% !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    color: #2563eb !important;
}

.wpgl-export.wpgl-template-5164 .wpgl-section-content {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.wpgl-export.wpgl-template-5164
.wpgl-section-content .wpgl-preview-value {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 8.5px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

/* =========================================================
   AVERY 5164 — EXPORT HEADER FONT SIZES
   ========================================================= */

.wpgl-export.wpgl-template-5164 .wpgl-label-header .wpgl-product .wpgl-preview-value {
    font-size: 26px !important;
    line-height: 1.03 !important;
    font-weight: 800 !important;
    color: #111111 !important;
    text-align: center !important;
}

.wpgl-export.wpgl-template-5164 .wpgl-label-header .wpgl-business .wpgl-preview-value {
    font-size: 17px !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
    color: #d85000 !important;
    text-align: center !important;
}

.wpgl-export.wpgl-template-5164 .wpgl-label-header .wpgl-address .wpgl-preview-value {
    font-size: 11px !important;
    line-height: 1.1 !important;
    color: #777777 !important;
    text-align: center !important;
}


/* =========================================================
   PREVIEW INTRO / OUTPUT INFORMATION
   ========================================================= */

.wpgl-preview-intro {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpgl-preview-intro br {
    display: none;
}

.wpgl-preview-intro strong {
    font-size: 14px;
    line-height: 1.35;
    color: #0f172a;
}

.wpgl-preview-intro span {
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}

.wpgl-template-output-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #64748b;
    text-align: center;
}

.wpgl-template-output-note strong {
    color: #334155;
    font-weight: 700;
}

@media (max-width: 600px) {
    .wpgl-preview-intro {
        padding: 12px 14px;
    }

    .wpgl-preview-intro span,
    .wpgl-template-output-note {
        font-size: 12px;
    }
}


/* =========================================================
   BRANDING REMOVED
   ========================================================= */
.wpgl-branding {
    display: none !important;
}


/* =========================================================
   CLEAN AVERY LIVE PREVIEW SYSTEM
   ========================================================= */

.wpgl-template-preview[hidden] {
    display: none !important;
}

.wpgl-template-preview {
    width: 100%;
}

.wpgl-preview-workspace {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
}

.wpgl-preview-workspace .wpgl-paper {
    box-sizing: border-box;
    width: min(100%, 640px);
    max-width: 100%;
    height: auto;
    flex: 0 1 auto;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 {
    width: min(100%, 560px);
}

.wpgl-preview-workspace .wpgl-paper .wpgl-label {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box;
}

/* 5163: compact 4 x 2 layout, titles above content. */
.wpgl-paper.wpgl-template-5163 .wpgl-label {
    padding: 8px 14px 6px;
}

.wpgl-paper.wpgl-template-5163 .wpgl-product .wpgl-preview-value {
    font-size: 20px;
    line-height: 1.02;
}

.wpgl-paper.wpgl-template-5163 .wpgl-business .wpgl-preview-value {
    font-size: 13px;
    line-height: 1.05;
}

.wpgl-paper.wpgl-template-5163 .wpgl-address .wpgl-preview-value {
    font-size: 9px;
    line-height: 1.1;
}

.wpgl-paper.wpgl-template-5163 .wpgl-label-divider {
    margin: 4px 0 3px;
}

.wpgl-paper.wpgl-template-5163 .wpgl-label-body {
    gap: 2px;
}

.wpgl-paper.wpgl-template-5163 .wpgl-section {
    margin: 0 0 2px;
    text-align: center;
}

.wpgl-paper.wpgl-template-5163 .wpgl-section-title {
    margin: 0 0 1px;
    font-size: 8px;
    line-height: 1.1;
    letter-spacing: .5px;
    text-align: center;
}

.wpgl-paper.wpgl-template-5163 .wpgl-section-content,
.wpgl-paper.wpgl-template-5163 .wpgl-section-content .wpgl-preview-value {
    text-align: center;
}

.wpgl-paper.wpgl-template-5163 .wpgl-section-content .wpgl-preview-value {
    font-size: 8px;
    line-height: 1.12;
}

.wpgl-paper.wpgl-template-5163 .wpgl-tcs-statement {
    margin-top: 1px;
    padding: 0 2px;
    font-size: 6px;
    line-height: 1.05;
}

.wpgl-paper.wpgl-template-5163 .wpgl-required-statement {
    margin-top: 2px;
    padding: 0 2px;
    font-size: 6px;
    line-height: 1.05;
}

.wpgl-paper.wpgl-template-5163 .wpgl-label-footer {
    margin-top: auto;
    padding-top: 3px;
}

.wpgl-paper.wpgl-template-5163 .wpgl-footer-title,
.wpgl-paper.wpgl-template-5163 .wpgl-footer-value .wpgl-preview-value {
    font-size: 7px;
}

.wpgl-paper.wpgl-template-5163 .wpgl-branding {
    margin-top: 2px;
    font-size: 5px;
}

/* 5164: keep the larger, vertically spaced presentation. */
.wpgl-paper.wpgl-template-5164 .wpgl-label {
    padding: 16px 18px 10px;
}

.wpgl-paper.wpgl-template-5164 .wpgl-product .wpgl-preview-value {
    font-size: 26px;
    line-height: 1.03;
}

.wpgl-paper.wpgl-template-5164 .wpgl-business .wpgl-preview-value {
    font-size: 17px;
    line-height: 1.05;
}

.wpgl-paper.wpgl-template-5164 .wpgl-address .wpgl-preview-value {
    font-size: 11px;
    line-height: 1.1;
}

.wpgl-paper.wpgl-template-5164 .wpgl-section {
    margin: 0 0 5px;
    text-align: center;
}

.wpgl-paper.wpgl-template-5164 .wpgl-section-title {
    margin: 0 0 2px;
    font-size: 9px;
    line-height: 1.1;
    text-align: center;
}

.wpgl-paper.wpgl-template-5164 .wpgl-section-content,
.wpgl-paper.wpgl-template-5164 .wpgl-section-content .wpgl-preview-value {
    text-align: center;
}

.wpgl-paper.wpgl-template-5164 .wpgl-section-content .wpgl-preview-value {
    font-size: 8.5px;
    line-height: 1.15;
}

.wpgl-paper.wpgl-template-5164 .wpgl-label-footer {
    margin-top: auto;
}

/* Never apply the live preview's visual scaling to export/print nodes. */
.wpgl-export {
    transform: none !important;
}




/* =========================================================
   STABLE AVERY LIVE PREVIEW
   The paper keeps its true proportions. Only the selected
   template is visible and optional body content can grow
   slightly after hidden blocks collapse.
   ========================================================= */
.wpgl-template-preview[hidden] { display: none !important; }

.wpgl-preview-workspace .wpgl-paper {
    width: min(100%, 640px) !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 {
    width: min(100%, 500px) !important;
}

.wpgl-paper .wpgl-label {
    --wpgl-content-scale: 1;
    overflow: hidden;
    box-sizing: border-box;
}

/* Keep safe breathing room from the border. */
.wpgl-paper.wpgl-template-5163 .wpgl-label {
    padding: 12px 18px 10px !important;
}

.wpgl-paper.wpgl-template-5164 .wpgl-label {
    padding: 18px 22px 14px !important;
}

/* Never auto-scale header/footer. */
.wpgl-paper .wpgl-product .wpgl-preview-value,
.wpgl-paper .wpgl-business .wpgl-preview-value,
.wpgl-paper .wpgl-address .wpgl-preview-value,
.wpgl-paper .wpgl-footer-title,
.wpgl-paper .wpgl-footer-value .wpgl-preview-value {
    transform: none !important;
}

/* Body content grows only when optional sections disappear. */
.wpgl-paper.wpgl-template-5163 .wpgl-section-title {
    font-size: calc(8px * var(--wpgl-content-scale)) !important;
}
.wpgl-paper.wpgl-template-5163 .wpgl-section-content .wpgl-preview-value {
    font-size: calc(8px * var(--wpgl-content-scale)) !important;
}
.wpgl-paper.wpgl-template-5163 .wpgl-tcs-statement {
    font-size: calc(6px * var(--wpgl-content-scale)) !important;
}
.wpgl-paper.wpgl-template-5163 .wpgl-required-statement {
    font-size: calc(6px * var(--wpgl-content-scale)) !important;
}

.wpgl-paper.wpgl-template-5164 .wpgl-section-title {
    font-size: calc(11px * var(--wpgl-content-scale)) !important;
}
.wpgl-paper.wpgl-template-5164 .wpgl-section-content .wpgl-preview-value {
    font-size: calc(10px * var(--wpgl-content-scale)) !important;
}
.wpgl-paper.wpgl-template-5164 .wpgl-tcs-statement,
.wpgl-paper.wpgl-template-5164 .wpgl-required-statement {
    font-size: calc(8px * var(--wpgl-content-scale)) !important;
}

/* Hidden sections cannot leave vertical gaps. */
.wpgl-label-body > [style*="display: none"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* =========================================================
   FINAL LIVE PREVIEW TYPOGRAPHY
   Readable base sizes first; optional hidden sections only
   increase BODY text. Header/footer geometry remains stable.
   ========================================================= */

/* 5163 — 4 x 2 in */
.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-label {
    padding: 13px 18px 11px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-label-body {
    gap: 4px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-section-title {
    font-size: calc(12px * var(--wpgl-content-scale)) !important;
    line-height: 1.12 !important;
    margin-bottom: 2px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-section-content .wpgl-preview-value {
    font-size: calc(12px * var(--wpgl-content-scale)) !important;
    line-height: 1.18 !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-tcs-statement {
    font-size: calc(8.5px * var(--wpgl-content-scale)) !important;
    line-height: 1.18 !important;
    padding: 0 4px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-required-statement {
    font-size: calc(8.5px * var(--wpgl-content-scale)) !important;
    line-height: 1.16 !important;
    padding: 0 4px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-footer-title,
.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-footer-value .wpgl-preview-value {
    font-size: 10px !important;
}

/* 5164 — 4 x 3 1/3 in: intentionally taller and roomier */
.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 {
    width: min(100%, 560px) !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 .wpgl-label-body {
    gap: 7px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 .wpgl-section-title {
    font-size: calc(14px * var(--wpgl-content-scale)) !important;
    line-height: 1.12 !important;
    margin-bottom: 3px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 .wpgl-section-content .wpgl-preview-value {
    font-size: calc(13px * var(--wpgl-content-scale)) !important;
    line-height: 1.22 !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 .wpgl-tcs-statement,
.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 .wpgl-required-statement {
    font-size: calc(10px * var(--wpgl-content-scale)) !important;
    line-height: 1.2 !important;
}

/* Do not reserve space for hidden optional blocks. */
.wpgl-preview-workspace .wpgl-label-body > [style*="display: none"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* TCS visibility is controlled by frontend.js for every template copy.
   Explicit Yes/No state must win over preview-only layout rules. */
.wpgl-tcs-statement[style*="display: block"] {
    display: block !important;
}
.wpgl-export.wpgl-template-5163
.wpgl-tcs-statement[style*="display: block"] {
    display: block !important;
}

.wpgl-export.wpgl-template-5164
.wpgl-tcs-statement[style*="display: block"] {
    display: block !important;
}

/* =========================================================
   OPTIONAL-FIELD SPACE RECOVERY — FINAL
   Product and Business sizes remain fixed.
   Ingredients / Contains / TCS / required statement may use
   reclaimed space when optional fields are hidden.
   ========================================================= */

/* The body is allowed to occupy reclaimed vertical space. */
.wpgl-template-preview.is-active .wpgl-label-body {
    width: 100%;
}

/* Keep footer safely separated; only its missing items collapse. */
.wpgl-template-preview.is-active .wpgl-label-footer {
    margin-top: 8px !important;
}

.wpgl-template-preview.is-active .wpgl-footer-item[style*="display: none"] {
    display: none !important;
}

/* If one footer item is hidden, the remaining item gets the row. */
.wpgl-template-preview.is-active .wpgl-label-footer:has(.wpgl-footer-item[style*="display: none"]) {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Same dynamic typography is preserved by the export clone. */
.wpgl-export.wpgl-template-5163 .wpgl-section-title {
    font-size: calc(10px * var(--wpgl-content-scale, 1)) !important;
}
.wpgl-export.wpgl-template-5163 .wpgl-section-content .wpgl-preview-value {
    font-size: calc(10px * var(--wpgl-content-scale, 1)) !important;
}
.wpgl-export.wpgl-template-5163 .wpgl-tcs-statement,
.wpgl-export.wpgl-template-5163 .wpgl-required-statement {
    font-size: calc(7.5px * var(--wpgl-content-scale, 1)) !important;
    line-height: 1.18 !important;
}

.wpgl-export.wpgl-template-5164 .wpgl-section-title {
    font-size: calc(12px * var(--wpgl-content-scale, 1)) !important;
}
.wpgl-export.wpgl-template-5164 .wpgl-section-content .wpgl-preview-value {
    font-size: calc(12px * var(--wpgl-content-scale, 1)) !important;
}
.wpgl-export.wpgl-template-5164 .wpgl-tcs-statement,
.wpgl-export.wpgl-template-5164 .wpgl-required-statement {
    font-size: calc(9px * var(--wpgl-content-scale, 1)) !important;
    line-height: 1.2 !important;
}


/* =========================================================
   AVERY 5163 — PDF / PNG / PRINT VERTICAL FIT
   ========================================================= */

.wpgl-export.wpgl-template-5163 {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
}

.wpgl-export.wpgl-template-5163 .wpgl-label-header {
    transform: translateY(-2px) !important;
}

.wpgl-export.wpgl-template-5163 .wpgl-label-body {
    transform: translateY(-2px) !important;
}

.wpgl-export.wpgl-template-5163 .wpgl-label-footer {
    margin-top: 2px !important;
    padding-top: 2px !important;
}

/* WPGL FINAL STATEMENT WIDTH FIX v16
 * Keep the TCS and required statements as natural flowing text.
 * No manual/source line breaks and no character-level breaking.
 * Applies to live preview and export DOMs (PDF/PNG/Print).
 */
.wpgl-tcs-statement,
.wpgl-required-statement,
.wpgl-export .wpgl-tcs-statement,
.wpgl-export .wpgl-required-statement {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.wpgl-tcs-statement strong {
    white-space: nowrap !important;
}


/* WPGL FINAL STATEMENT EDGE CLEARANCE v17
 * Keep the wide legal statements away from the footer divider/border.
 * This is a visual lift only, so it does not consume extra label height
 * and will not break the existing auto-fit calculation.
 */
.wpgl-tcs-statement,
.wpgl-required-statement,
.wpgl-export .wpgl-tcs-statement,
.wpgl-export .wpgl-required-statement {
    position: relative !important;
    top: -2px !important;
}

.wpgl-required-statement {
    margin-bottom: 1px !important;
}

/* WPGL FOOTER LIFT v18
 * Give Made On / Batch a little breathing room from the bottom edge.
 * This is intentionally a small padding change so the existing
 * middle-content auto-fit behavior remains intact.
 */
.wpgl-preview-workspace .wpgl-paper.wpgl-template-5163 .wpgl-label {
    padding-bottom: 13px !important;
}

.wpgl-preview-workspace .wpgl-paper.wpgl-template-5164 .wpgl-label {
    padding-bottom: 16px !important;
}

.wpgl-export.wpgl-template-5163 .wpgl-label {
    padding-bottom: 3px !important;
}

.wpgl-export.wpgl-template-5164 .wpgl-label {
    padding-bottom: 12px !important;
}
