/*
 * Roth Pet of the Month — public raffle form and winner presentation.
 * Brand values sampled from rothcarpetcleaning.com:
 * #ff0000 top bar/service heading/coupon accents; #282828 navigation;
 * #454545 headings; #808080 body copy; #f3f3f3 testimonial/coupon panels;
 * #e5e5e5 borders; #ffffff content. CTA uses #707070, a contrast-safe
 * darkening of the live child theme's #888888 button with white labels.
 */
.roth-pom,
.roth-pom__unavailable,
.roth-pom-public-winner,
.roth-pom-winner-card {
    --roth-pom-primary: #707070;
    --roth-pom-primary-2: #282828;
    --roth-pom-primary-hover: #000000;
    --roth-pom-secondary: #282828;
    --roth-pom-accent: #FF0000;
    --roth-pom-heading: #FF0000;
    --roth-pom-bg: #F3F3F3;
    --roth-pom-surface: #FFFFFF;
    --roth-pom-paper: #FFFFFF;
    --roth-pom-border: #E5E5E5;
    --roth-pom-field-border: #888888;
    --roth-pom-text: #454545;
    --roth-pom-text-muted: #707070;
    --roth-pom-ink: var(--roth-pom-text);
    --roth-pom-muted: var(--roth-pom-text-muted);
    --roth-pom-line: var(--roth-pom-border);
    --roth-pom-soft: var(--roth-pom-bg);
    --roth-pom-danger: #B00000;
    --roth-pom-success: var(--roth-pom-secondary);
    --roth-pom-radius: 0;
    --roth-pom-radius-control: 0;
    --roth-pom-shadow: none;
    box-sizing: border-box;
    color: var(--roth-pom-text);
    font-family: inherit;
    line-height: 1.55;
}

.roth-pom *,
.roth-pom *::before,
.roth-pom *::after,
.roth-pom-public-winner *,
.roth-pom-winner-card * {
    box-sizing: border-box;
}

.roth-pom {
    position: relative;
    isolation: isolate;
    width: min(calc(100% - 2rem), 780px);
    margin: clamp(1.5rem, 4vw, 3rem) auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    overflow: hidden;
    border: 1px solid var(--roth-pom-border);
    border-top: 3px solid var(--roth-pom-accent);
    border-radius: var(--roth-pom-radius);
    background: var(--roth-pom-surface);
    box-shadow: var(--roth-pom-shadow);
}

.roth-pom__intro {
    max-width: 590px;
    margin: 0 0 2rem;
}

.roth-pom__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 .78rem;
    color: var(--roth-pom-primary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.roth-pom__eyebrow::before {
    width: 1.55rem;
    height: 2px;
    background: var(--roth-pom-accent);
    content: "";
}

.roth-pom__title {
    max-width: 18ch;
    margin: 0;
    color: var(--roth-pom-heading);
    font-size: clamp(2rem, 4vw, 2.375rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.08;
    text-wrap: balance;
}

.roth-pom__prize {
    max-width: 39rem;
    margin: 1.05rem 0 0;
    border-left: 3px solid var(--roth-pom-accent);
    padding: .08rem 0 .08rem .9rem;
    color: var(--roth-pom-secondary);
    font-size: clamp(1rem, 2vw, 1.08rem);
    font-weight: 700;
    line-height: 1.45;
}

.roth-pom__lede {
    max-width: 36rem;
    margin: .72rem 0 0;
    color: var(--roth-pom-text);
    font-size: .96rem;
}

.roth-pom__form {
    border-top: 1px solid var(--roth-pom-line);
    padding-top: 1.5rem;
}

.roth-pom__form-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.25rem;
}

.roth-pom__form-heading h3,
.roth-pom__receipt h3 {
    margin: 0;
    color: var(--roth-pom-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
}

.roth-pom__form-heading p {
    margin: .38rem 0 0;
    color: var(--roth-pom-text);
    font-size: .84rem;
    line-height: 1.45;
}

.roth-pom__required-note {
    flex: 0 0 auto;
    color: var(--roth-pom-text);
    font-size: .76rem;
}

.roth-pom__required-note span,
.roth-pom__field label > span[aria-hidden="true"] {
    color: var(--roth-pom-danger);
    font-weight: 700;
}

.roth-pom__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.05rem 1.15rem;
}

.roth-pom__field,
.roth-pom__consent {
    min-width: 0;
}

.roth-pom__field--wide,
.roth-pom__consent {
    grid-column: 1 / -1;
}

.roth-pom__field label {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    margin: 0 0 .42rem;
    color: var(--roth-pom-secondary);
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.35;
}

.roth-pom__optional {
    margin-left: .18rem;
    color: var(--roth-pom-text-muted);
    font-size: .72rem;
    font-weight: 500;
}

.roth-pom__field input:not([type="file"]),
.roth-pom__field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 1px solid var(--roth-pom-field-border);
    border-radius: var(--roth-pom-radius-control);
    padding: .7rem .82rem;
    background: var(--roth-pom-paper);
    color: var(--roth-pom-ink);
    font: inherit;
    line-height: 1.4;
    transition: border-color .16s ease, outline-color .16s ease;
}

.roth-pom__field textarea {
    min-height: 104px;
    resize: vertical;
}

.roth-pom__field input::placeholder,
.roth-pom__field textarea::placeholder {
    color: var(--roth-pom-text-muted);
    opacity: 1;
}

.roth-pom__field input:focus,
.roth-pom__field textarea:focus {
    border-color: var(--roth-pom-primary);
    outline: 2px solid var(--roth-pom-accent);
    outline-offset: 2px;
    background: var(--roth-pom-surface);
    box-shadow: none;
}

.roth-pom__field input:user-invalid,
.roth-pom__field textarea:user-invalid {
    border-color: var(--roth-pom-danger);
}

.roth-pom__field-help {
    margin: -.08rem 0 .62rem;
    color: var(--roth-pom-text);
    font-size: .79rem;
    line-height: 1.5;
}

.roth-pom__photo-field input[type="file"] {
    display: block;
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--roth-pom-field-border);
    border-radius: var(--roth-pom-radius-control);
    padding: .42rem;
    background: var(--roth-pom-bg);
    color: var(--roth-pom-text);
    font: inherit;
    font-size: .82rem;
}

.roth-pom__photo-field input[type="file"]::file-selector-button {
    min-height: 40px;
    margin-right: .72rem;
    border: 1px solid #FFFFFF;
    border-radius: 0;
    padding: 10px 25px;
    background: var(--roth-pom-primary);
    color: #FFFFFF;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .16s ease;
}

.roth-pom__photo-field input[type="file"]::file-selector-button:hover {
    background: var(--roth-pom-primary-hover);
}

.roth-pom__photo-field input[type="file"]:focus-visible {
    outline: 3px solid var(--roth-pom-accent);
    outline-offset: 3px;
}

.roth-pom__photo-preview {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    margin-top: .75rem;
    border: 1px solid var(--roth-pom-line);
    border-radius: 0;
    padding: .58rem;
    background: var(--roth-pom-surface);
}

.roth-pom__photo-preview[hidden],
.roth-pom__file-error[hidden] {
    display: none;
}

.roth-pom__photo-preview img {
    display: block;
    flex: 0 0 84px;
    width: 84px;
    height: 74px;
    object-fit: cover;
    background: var(--roth-pom-bg);
}

.roth-pom__photo-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .75rem;
    min-width: 0;
}

.roth-pom__photo-actions span {
    flex-basis: 100%;
    overflow: hidden;
    color: var(--roth-pom-text);
    font-size: .77rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roth-pom__photo-actions button,
.roth-pom__share-button {
    min-height: 36px;
    border: 0;
    border-radius: 0;
    padding: .25rem .15rem;
    background: transparent;
    color: var(--roth-pom-primary-hover);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.roth-pom__photo-actions button:hover,
.roth-pom__share-button:hover {
    color: var(--roth-pom-accent);
}

.roth-pom__file-error {
    margin: .55rem 0 0;
    border-left: 3px solid var(--roth-pom-danger);
    padding: .22rem .65rem;
    color: #7A0000;
    font-size: .82rem;
    font-weight: 650;
}

.roth-pom__upload {
    min-width: 0;
    border: 1px solid var(--roth-pom-border);
    border-radius: 0;
    padding: .9rem;
    background: var(--roth-pom-bg);
}

.roth-pom__consent {
    margin-top: .12rem;
    border-top: 1px solid var(--roth-pom-border);
    padding-top: 1.05rem;
}

.roth-pom__consent label {
    display: flex;
    align-items: flex-start;
    gap: .72rem;
    cursor: pointer;
}

.roth-pom__consent input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: .12rem 0 0;
    accent-color: var(--roth-pom-accent);
}

.roth-pom__consent strong,
.roth-pom__consent small {
    display: block;
}

.roth-pom__consent strong {
    color: var(--roth-pom-secondary);
    font-size: .83rem;
    line-height: 1.4;
}

.roth-pom__consent small {
    margin-top: .18rem;
    color: var(--roth-pom-text);
    font-size: .77rem;
    line-height: 1.5;
}

.roth-pom__submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.35rem;
}

.roth-pom__submit-row p {
    max-width: 23rem;
    margin: 0;
    color: var(--roth-pom-text);
    font-size: .75rem;
    line-height: 1.5;
}

.roth-pom__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-width: 0;
    min-height: 46px;
    border: 1px solid #FFFFFF;
    border-radius: 0;
    padding: 10px 25px;
    background: var(--roth-pom-primary) !important;
    color: #FFFFFF !important;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.4;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease;
}

.roth-pom__submit:hover:not(:disabled) {
    border-color: #FFFFFF !important;
    background: var(--roth-pom-primary-hover) !important;
}

.roth-pom__submit:disabled {
    cursor: wait;
}

.roth-pom__submit-arrow {
    color: #FFFFFF;
    font-size: 1.2rem;
    line-height: 1;
}

.roth-pom__notice,
.roth-pom__receipt {
    margin: 0 0 1.4rem;
    border-radius: 0;
    padding: 1rem 1.1rem;
}

.roth-pom__notice--error {
    border: 1px solid var(--roth-pom-danger);
    border-left-width: 3px;
    background: var(--roth-pom-surface);
    color: #7A0000;
}

.roth-pom__receipt {
    display: flex;
    gap: .9rem;
    border: 1px solid var(--roth-pom-border);
    border-top: 3px solid var(--roth-pom-accent);
    background: var(--roth-pom-bg);
    color: var(--roth-pom-ink);
}

.roth-pom__receipt-mark {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 0;
    background: var(--roth-pom-accent);
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 800;
}

.roth-pom__receipt h3 {
    margin: .05rem 0 .35rem;
    color: var(--roth-pom-secondary);
}

.roth-pom__receipt p {
    margin: .3rem 0;
}

.roth-pom__receipt-prize {
    color: var(--roth-pom-secondary);
    font-weight: 700;
}

.roth-pom__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem .8rem;
    margin-top: .75rem;
    border-top: 1px solid var(--roth-pom-border);
    padding-top: .65rem;
    font-size: .78rem;
}

.roth-pom__share > span:first-child {
    flex-basis: 100%;
    color: var(--roth-pom-text);
}

.roth-pom__share-feedback {
    color: var(--roth-pom-secondary);
}

.roth-pom__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.roth-pom :focus-visible,
.roth-pom__unavailable :focus-visible {
    outline: 3px solid var(--roth-pom-accent);
    outline-offset: 3px;
}

.roth-pom__unavailable {
    width: min(calc(100% - 2rem), 780px);
    margin: 2rem auto;
    border: 1px solid var(--roth-pom-border);
    border-left: 3px solid var(--roth-pom-accent);
    border-radius: 0;
    padding: 1rem 1.15rem;
    background: var(--roth-pom-bg);
    color: var(--roth-pom-text);
}

/* Public winner cards emitted by the companion winner renderer. */
.roth-pom-public-winner,
.roth-pom-winner-card {
    width: min(calc(100% - 2rem), 920px);
    margin: clamp(2rem, 5vw, 4rem) auto;
    overflow: hidden;
    border: 1px solid var(--roth-pom-border);
    border-radius: 0;
    background: var(--roth-pom-surface);
    box-shadow: none;
}

.roth-pom-public-winners {
    display: grid;
    gap: 1.2rem;
}

.roth-pom-public-winner {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    align-items: stretch;
}

.roth-pom-public-winner img,
.roth-pom-public-winner__image,
.roth-pom-public-winner__image-wrap,
.roth-pom-winner-card img,
.roth-pom-winner-card__photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 290px;
    object-fit: cover;
    background: var(--roth-pom-bg);
}

.roth-pom-public-winner__content,
.roth-pom-winner-card__content {
    align-self: center;
    padding: clamp(1.4rem, 4vw, 3rem);
}

.roth-pom-public-winner__month,
.roth-pom-public-winner__badge,
.roth-pom-winner-card__month {
    color: var(--roth-pom-primary);
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.roth-pom-public-winner h2,
.roth-pom-public-winner__name,
.roth-pom-winner-card h2 {
    margin: .5rem 0 .7rem;
    color: var(--roth-pom-heading);
    font-size: clamp(1.875rem, 4vw, 2.375rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
}

.roth-pom-public-winner__caption,
.roth-pom-winner-card__caption {
    border-left: 3px solid var(--roth-pom-accent);
    padding-left: .8rem;
    color: var(--roth-pom-text);
    font-size: .96rem;
}

.roth-pom-public-winner__image-wrap {
    position: relative;
    min-height: 290px;
    overflow: hidden;
}

.roth-pom-public-winner__image-wrap img {
    position: absolute;
    inset: 0;
}

.roth-pom-public-winner__badge {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    border: 1px solid #FFFFFF;
    border-radius: 0;
    padding: .42rem .72rem;
    background: var(--roth-pom-secondary);
    color: #FFFFFF;
    letter-spacing: .04em;
}

@media (max-width: 767px) {
    .roth-pom {
        width: min(calc(100% - 1.25rem), 780px);
        margin: 1.1rem auto;
        padding: clamp(1.1rem, 5vw, 1.5rem);
    }

    .roth-pom__intro {
        margin-bottom: 1.55rem;
    }

    .roth-pom__fields {
        grid-template-columns: minmax(0, 1fr);
        gap: .9rem;
    }

    .roth-pom__field--wide,
    .roth-pom__consent {
        grid-column: auto;
    }

    .roth-pom__form-heading {
        align-items: flex-start;
    }

    .roth-pom__required-note {
        padding-top: .2rem;
        white-space: nowrap;
    }

    .roth-pom__submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .roth-pom__submit-row p {
        max-width: none;
    }

    .roth-pom__submit {
        width: 100%;
    }

    .roth-pom-public-winner {
        grid-template-columns: 1fr;
    }

    .roth-pom-public-winner img,
    .roth-pom-public-winner__image-wrap,
    .roth-pom-winner-card img,
    .roth-pom-winner-card__photo {
        height: 250px;
        min-height: 0;
    }

    .roth-pom-public-winner__image-wrap img {
        height: 250px;
    }
}

@media (max-width: 390px) {
    .roth-pom__form-heading {
        display: block;
    }

    .roth-pom__required-note {
        display: inline-block;
        margin-top: .5rem;
    }

    .roth-pom__photo-preview {
        align-items: flex-start;
        gap: .6rem;
    }

    .roth-pom__upload {
        padding: .72rem;
    }

    .roth-pom__photo-preview img {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
    }

    .roth-pom__photo-actions {
        gap: .1rem .45rem;
    }

    .roth-pom__receipt {
        gap: .65rem;
        padding: .85rem;
    }

    .roth-pom__receipt-mark {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 340px) {
    .roth-pom {
        width: calc(100% - 1rem);
        padding: 1rem;
    }

    .roth-pom__title {
        font-size: 2rem;
    }

    .roth-pom__photo-field input[type="file"] {
        font-size: .72rem;
    }

    .roth-pom__photo-field input[type="file"]::file-selector-button {
        margin-right: .35rem;
        padding-inline: .58rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .roth-pom *,
    .roth-pom *::before,
    .roth-pom *::after,
    .roth-pom-public-winner *,
    .roth-pom-winner-card * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
