/*
 * California dealer notice (includes/ca-dealer-notice.php): a compact note under
 * Add to Cart on product pages, and a fuller notice at the top of the cart.
 *
 * The site's colours, as in forms.css. The brand orange (#d84f25) is only 3.7:1
 * on the tint, below WCAG AA for text, so it marks the accent rule and the icon;
 * the link and the button use the darker orange (#b23f1b, 5.2:1 / 5.8:1).
 * Selectors are doubled (.cgw-ca-notice.cgw-ca-notice) so the Elementor kit's
 * link and paragraph styles do not win on specificity.
 */

.cgw-ca-notice.cgw-ca-notice {
    --cgw-heading: #1f2616;
    --cgw-text: #3d5225;
    --cgw-accent: #d84f25;
    --cgw-accent-dark: #b23f1b;
    --cgw-accent-darker: #962f12;
    --cgw-tint: #f3f3ef;
    --cgw-border: #deded6;

    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    width: 100%;
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid var(--cgw-border);
    border-left: 4px solid var(--cgw-accent);
    border-radius: 8px;
    background: var(--cgw-tint);
    color: var(--cgw-text);
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.cgw-ca-notice.cgw-ca-notice * {
    box-sizing: border-box;
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__icon {
    flex: 0 0 auto;
    align-self: flex-start;
    width: 36px;
    height: 36px;
    padding: 7px;
    border-radius: 50%;
    background: #fff;
    color: var(--cgw-accent);
    box-shadow: 0 0 0 1px var(--cgw-border);
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__text {
    flex: 1 1 240px;
    min-width: 0;
}

.cgw-ca-notice.cgw-ca-notice p {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__title {
    margin-bottom: 2px;
    color: var(--cgw-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__link {
    color: var(--cgw-accent-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__link:hover,
.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__link:focus-visible {
    color: var(--cgw-accent-darker);
    text-decoration-thickness: 2px;
}

/* ---- Cart: larger, with a button ---------------------------------------- */

.cgw-ca-notice.cgw-ca-notice--cart {
    margin: 0 0 24px;
    padding: 20px 24px;
    gap: 16px 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 38, 22, 0.06), 0 4px 12px rgba(31, 38, 22, 0.05);
    font-size: 15px;
}

.cgw-ca-notice.cgw-ca-notice--cart .cgw-ca-notice__icon {
    width: 44px;
    height: 44px;
    padding: 9px;
    background: var(--cgw-tint);
    box-shadow: none;
}

.cgw-ca-notice.cgw-ca-notice--cart .cgw-ca-notice__title {
    margin-bottom: 4px;
    font-size: 18px;
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__button {
    flex: 0 0 auto;
    display: inline-block;
    padding: 12px 20px;
    border-radius: 6px;
    background: var(--cgw-accent-dark);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__button:hover,
.cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__button:focus-visible {
    background: var(--cgw-accent-darker);
    color: #fff;
}

.cgw-ca-notice.cgw-ca-notice a:focus-visible {
    outline: 2px solid var(--cgw-accent-dark);
    outline-offset: 2px;
}

/* Narrow screens: the button takes the full width under the text. */
@media (max-width: 560px) {
    .cgw-ca-notice.cgw-ca-notice--cart {
        padding: 16px;
    }

    .cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__button {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cgw-ca-notice.cgw-ca-notice .cgw-ca-notice__button {
        transition: none;
    }
}
