/* WordPress integration for the design stylesheet (site.css). Keeps WordPress wrappers out of the layout. */

body.site-shell { margin: 0; }

.wp-site-blocks,
.rr-part,
.rr-main,
.wp-block-post-content.rr-page-content { display: contents; }

/* The design's sticky header sits below the admin toolbar when logged in. */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 0; } }

/* Template parts and block wrappers must not add spacing between design sections. */
.wp-site-blocks > * + *,
.rr-main > * + * { margin-block-start: 0; }

/* Post content inside the article body inherits the design typography. */
.article-body.wp-block-post-content > * { margin-block-start: 0; }

/* Blog topic filters are links (so filtering works without JavaScript); match the button styling. */
.archive-topic-filters a { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 13px; border: 1px solid var(--cp-border); border-radius: 4px; background: transparent; color: var(--cp-text-muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.archive-topic-filters a:hover { border-color: var(--cp-accent); color: var(--cp-text); }
.archive-topic-filters a.is-active { border-color: var(--cp-accent-surface); background: var(--cp-accent-surface); color: var(--cp-accent-fg); }
.archive-topic-filters a:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
@media (max-width: 640px) { .archive-topic-filters a { flex: 1 1 auto; justify-content: center; } }
.archive-search { margin: 0; }
.archive-empty { padding: 48px 0; color: var(--cp-text-muted); }

/* The search dialog is server-rendered and toggled with the hidden attribute. */
.search-overlay[hidden] { display: none; }
.rr-search-form { margin: 0; }

/* Block editor buttons: the design classes replace WordPress button styling on the front end. */
.wp-block-button.button,
.wp-block-button.text-link { display: inline-flex; }

/* 404 page */
.rr-not-found { padding: 120px 0 140px; background: var(--cp-bg); }
.rr-not-found h1 { max-width: 760px; margin: 12px 0 18px; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.rr-not-found p:not(.eyebrow) { max-width: 620px; color: var(--cp-text-muted); font-size: 18px; line-height: 1.6; }
.rr-not-found .button-row { margin-top: 28px; }

/* ---------- Converted pages ---------- */

/* Structural wrappers created by the block conversion add no layout of their own. */
.rr-contents { display: contents; }
.wp-block-buttons.rr-contents > .wp-block-button { display: contents; }

/* Alternate states of tabbed widgets (shown by site.js). */
.need-result.rr-need-alt,
.endorsement-showcase-layout.rr-endorsement-alt { display: none; }
[hidden] { display: none !important; }

/* Privacy banner starts hidden until site.js checks for a saved choice. */
.privacy-banner[hidden] { display: none; }

/* Icon-only spans produced from decorative icons. */
.rr-icon-only:empty { display: none; }

/* Forms provided by Mailchimp for WordPress, Contact Form 7, or the theme fallback, styled like the design's forms. */
.rr-plugin-form form,
.rr-fallback-form { display: grid; gap: 18px; margin: 0; }
.rr-plugin-form .mc4wp-form-fields { display: grid; gap: 16px; }
.rr-plugin-form p { margin: 0; }
.rr-plugin-form label,
.rr-fallback-form label { display: grid; gap: 8px; color: var(--cp-text); font-size: 14px; font-weight: 700; }
.rr-plugin-form label small,
.rr-fallback-form label small { color: var(--cp-text-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rr-plugin-form input[type="text"],
.rr-plugin-form input[type="email"],
.rr-plugin-form input[type="tel"],
.rr-plugin-form input[type="url"],
.rr-plugin-form select,
.rr-plugin-form textarea,
.rr-fallback-form input[type="text"],
.rr-fallback-form input[type="email"],
.rr-fallback-form textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--cp-border-strong); border-radius: 4px; background: var(--cp-surface); color: var(--cp-text); font: inherit; font-size: 15px; }
.rr-plugin-form textarea,
.rr-fallback-form textarea { min-height: 140px; resize: vertical; }
.rr-plugin-form input:focus,
.rr-plugin-form textarea:focus,
.rr-fallback-form input:focus,
.rr-fallback-form textarea:focus { border-color: var(--cp-accent); outline: 2px solid var(--cp-accent-soft); outline-offset: 2px; }
.rr-plugin-form input[type="checkbox"],
.rr-fallback-form input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cp-accent); }
.rr-plugin-form label:has(input[type="checkbox"]),
.rr-fallback-form .request-form-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--cp-text-muted); }
.rr-plugin-form input[type="submit"],
.rr-plugin-form button[type="submit"],
.rr-plugin-form .wpcf7-submit { justify-self: start; min-height: 46px; padding: 0 22px; border: 0; border-radius: 4px; background: var(--cp-accent-surface); color: var(--cp-accent-fg); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.rr-plugin-form input[type="submit"]:hover,
.rr-plugin-form .wpcf7-submit:hover { background: var(--cp-accent-surface-hover); }
.rr-plugin-form .mc4wp-response,
.rr-plugin-form .wpcf7-response-output { margin: 0; color: var(--cp-text); font-size: 14px; }
.rr-plugin-form .mc4wp-alert.mc4wp-success,
.rr-plugin-form .wpcf7 form.sent .wpcf7-response-output { padding: 14px 16px; border-left: 3px solid var(--cp-success); background: var(--cp-accent-soft); }
.rr-plugin-form .wpcf7-not-valid-tip { color: var(--cp-danger); font-size: 13px; }
.rr-fallback-form .request-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rr-fallback-form .request-form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .rr-fallback-form .request-form-grid { grid-template-columns: 1fr; } }

/* Thank-you note shown after a theme form is sent. */
.rr-form-success { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px; border: 1px solid var(--cp-border); border-left: 4px solid var(--cp-success); border-radius: 4px; background: var(--cp-surface); }
.rr-form-success svg { width: 24px; height: 24px; flex: 0 0 auto; color: var(--cp-success); }
.rr-form-success div { display: grid; gap: 4px; }
.rr-form-success span { color: var(--cp-text-muted); }

/* Older pages from the classic editor (not yet redesigned): a simple, readable column. */
.rr-legacy-page .wp-block-post-content.rr-page-content { display: block; width: min(860px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 96px; color: var(--cp-text); font-size: 17px; line-height: 1.7; }
.rr-legacy-page .rr-page-content h1,
.rr-legacy-page .rr-page-content h2,
.rr-legacy-page .rr-page-content h3 { line-height: 1.2; letter-spacing: -0.01em; }
.rr-legacy-page .rr-page-content a { color: var(--cp-accent); }
.rr-legacy-page .rr-page-content img { height: auto; }
.rr-legacy-page .rr-page-content .alignleft { float: left; margin: 0 24px 16px 0; }
.rr-legacy-page .rr-page-content .alignright { float: right; margin: 0 0 16px 24px; }
.rr-legacy-page .rr-page-content .aligncenter { display: block; margin: 0 auto 16px; }

/* Contact Form 7 inside the contact page's dark "Send us a message" section, matched to the design's form. */
.contact-form.rr-plugin-form form { gap: 22px; }
.contact-form.rr-plugin-form p { margin: 0; }
.contact-form.rr-plugin-form label { gap: 9px; color: #ffffff; font-size: 13px; font-weight: 720; }
.contact-form.rr-plugin-form label br { display: none; }
.contact-form.rr-plugin-form .wpcf7-form-control-wrap { display: block; margin-top: 9px; }
.contact-form.rr-plugin-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.contact-form.rr-plugin-form .wpcf7-acceptance label { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 11px; color: var(--contact-deep-muted); font-size: 12px; font-weight: 500; line-height: 1.55; cursor: pointer; }
.contact-form.rr-plugin-form .wpcf7-acceptance input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--contact-accent); }
.contact-form.rr-plugin-form .wpcf7-acceptance a { color: #ffffff; font-weight: 700; }
.contact-form.rr-plugin-form input.wpcf7-submit { width: auto; height: auto; min-height: 48px; margin-top: 4px; padding: 0 22px; border: 1px solid var(--contact-accent); border-radius: 4px; background: var(--contact-accent); color: #301a16; font-size: 15px; font-weight: 800; cursor: pointer; }
.contact-form.rr-plugin-form input.wpcf7-submit:hover { border-color: #ef9d8c; background: #ef9d8c; }
.contact-form.rr-plugin-form .wpcf7-spinner { margin: 0 0 0 12px; }
.contact-form.rr-plugin-form .wpcf7-response-output { margin: 0; color: #ffffff; border-color: #f5b7aa; }
.contact-form.rr-plugin-form .wpcf7-not-valid-tip { color: #ffc7bd; }

/* Password-protected pages (for example the demonstration videos). */
.rr-password-section { padding: 96px 0 120px; background: var(--cp-bg); }
.rr-password-box { max-width: 560px; padding: 34px 36px; border: 1px solid var(--cp-border); border-top: 3px solid var(--cp-accent-surface); border-radius: 4px; background: var(--cp-surface); }
.rr-password-box h1 { margin: 10px 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
.rr-password-box p { margin: 0 0 22px; color: var(--cp-text-muted); line-height: 1.6; }
.rr-password-box form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.rr-password-box label { display: grid; flex: 1 1 240px; gap: 8px; font-size: 14px; font-weight: 700; }
.rr-password-box input[type="password"] { min-height: 46px; padding: 0 14px; border: 1px solid var(--cp-border-strong); border-radius: 4px; background: var(--cp-surface); color: var(--cp-text); font: inherit; }
.rr-password-box input[type="password"]:focus { border-color: var(--cp-accent); outline: 2px solid var(--cp-accent-soft); outline-offset: 2px; }
.contact-form.rr-plugin-form textarea, .contact-form.rr-plugin-form input[type="text"], .contact-form.rr-plugin-form input[type="email"] { border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 2px; background: rgba(255, 255, 255, 0.07); color: #ffffff; }
