/* ==========================================================================
   INTERACTIVE GOOGLE ADS PREVIEW BUILDER TOOL
   Authentic Google Search UI, Desktop + Mobile, Sponsored vs Organic
   ========================================================================== */

.ad-builder-section {
    position: relative;
    border: none !important;
    overflow: visible;
}

.builder-header-block {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 2rem auto;
}

.gold-accent {
    background: linear-gradient(135deg, #E37400 0%, #FBBC05 50%, #F9AB00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ============================================================
   INSTRUCTION BAR (click to open modal editor)
   ============================================================ */
.ad-builder-instruction-box {
    background: #ffffff;
    border: 1px solid var(--hairline);
    border-radius: 1.25rem;
    padding: 1.1rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.1rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 3px 12px rgba(32, 33, 36, 0.04);
    cursor: pointer;
    transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
    outline: none;
}

.ad-builder-instruction-box:hover,
.ad-builder-instruction-box:focus {
    transform: translateY(-2px);
    border-color: rgba(66, 133, 244, 0.4);
    box-shadow: 0 10px 28px -8px rgba(66, 133, 244, 0.18);
}

.instruction-icon-pill {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e8f0fe;
    color: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.instruction-text-group {
    flex: 1;
    min-width: 0;
}

.instruction-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.instruction-title .text-primary {
    color: #4285f4;
}

.instruction-sub {
    font-size: 13px;
    color: var(--soft);
    margin-top: 2px;
    line-height: 1.45;
}

.btn-open-editor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ink);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.6rem 1.15rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 200ms ease, transform 200ms ease, color 200ms ease;
}

.btn-open-editor:hover {
    background: #fbbc05;
    color: var(--ink);
    transform: scale(1.03);
}

@media (max-width: 640px) {
    .ad-builder-instruction-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .btn-open-editor {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   PREVIEW CARD WRAPPER + DEVICE TABS
   ============================================================ */
.ad-builder-centered-preview {
    max-width: 780px;
    margin: 2rem auto 1.5rem;
    width: 100%;
    padding: 0 0.5rem;
}

.preview-card-wrapper {
    background: #ffffff;
    border: 1px solid var(--hairline);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: 0 12px 42px -12px rgba(32, 33, 36, 0.12), 0 2px 10px rgba(32, 33, 36, 0.05);
    transition: all 300ms ease;
    overflow: hidden;
}

.device-tab-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: #f1f3f4;
    padding: 4px;
    border-radius: 9999px;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.device-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.15rem;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--soft);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11.5px;
}

.device-tab:hover {
    color: var(--ink);
}

.device-tab.active {
    color: var(--ink);
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(32, 33, 36, 0.08);
}

/* ============================================================
   RENDER TARGET — Desktop mode base styles
   ============================================================ */
.ad-preview-render-target {
    padding: 0.25rem;
    border-radius: 1rem;
    min-height: 320px;
}

/* ============================================================
   GOOGLE PREVIEW HEADER (logo + search bar + filter strip)
   ============================================================ */
.google-preview-header-block {
    padding: 0.5rem 0 1rem 0;
    border-bottom: 1px solid rgba(32, 33, 36, 0.06);
    margin-bottom: 1rem;
}

.google-brand-logo-center {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.google-logo-svg {
    display: block;
    height: auto;
}

.google-search-bar-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-radius: 9999px;
    padding: 0.65rem 1.15rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 0.85rem auto;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
    transition: box-shadow 200ms ease, border-color 200ms ease;
}

.google-search-bar-pill:hover {
    box-shadow: 0 2px 14px rgba(32, 33, 36, 0.16);
    border-color: rgba(66, 133, 244, 0.4);
}

.google-search-query-text {
    flex: 1;
    font-family: arial, sans-serif;
    font-size: 14.5px;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.google-mic-icon {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .google-search-bar-pill {
        padding: 0.5rem 0.85rem;
        gap: 0.5rem;
    }

    .google-search-query-text {
        font-size: 13px;
    }
}

.google-filter-strip {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    max-width: 620px;
    margin: 0 auto;
    padding: 0 0.25rem;
    font-family: arial, sans-serif;
    font-size: 12.5px;
    color: #5f6368;
}

.google-filter-item {
    position: relative;
    padding: 0.55rem 0.15rem;
    cursor: default;
    white-space: nowrap;
}

.google-filter-item.active {
    color: #1a73e8;
    font-weight: 500;
}

.google-filter-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: #1a73e8;
    border-radius: 3px 3px 0 0;
}

/* ============================================================
   SPONSORED AD vs ORGANIC CONTAINER
   ============================================================ */
.ad-versus-organic-container {
    /* max-width: 620px; */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---------- SPONSORED AD CARD (Position #1) ---------- */
.sponsored-ad-render-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    transition: box-shadow 250ms ease, border-color 250ms ease;
}

.sponsored-ad-render-card:hover {
    border-color: rgba(66, 133, 244, 0.45);
    box-shadow: 0 6px 22px -6px rgba(26, 115, 232, 0.18);
}

.spot-number-badge {
    position: absolute;
    top: -11px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}

.spot-number-badge svg {
    color: #fbbc05;
}

.ad-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.45rem;
    font-family: arial, sans-serif;
    font-size: 12px;
    color: #3c4043;
    flex-wrap: wrap;
}

.ad-preview-sponsored {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid #3c4043;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #3c4043;
    letter-spacing: 0.02em;
}

.ad-preview-url {
    color: #3c4043;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-info-icon {
    margin-left: auto;
    color: #5f6368;
    display: inline-flex;
    cursor: help;
}

.ad-preview-title {
    font-family: arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    color: #1a0dab;
    margin: 0 0 0.4rem 0;
    cursor: pointer;
    transition: text-decoration 150ms ease;
    overflow-wrap: anywhere;
}

.ad-preview-title:hover {
    text-decoration: underline;
}

/* RATING ROW */
.ad-preview-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: arial, sans-serif;
    font-size: 12px;
    color: #3c4043;
    margin-bottom: 0.5rem;
}

.ad-preview-rating>span:first-child {
    font-weight: 700;
    color: #202124;
}

.ad-preview-rating-stars {
    display: inline-flex;
    gap: 1px;
}

.ad-preview-rating-stars svg {
    display: inline-block;
}

/* DESCRIPTION */
.ad-preview-description {
    font-family: arial, sans-serif;
    font-size: 14px;
    line-height: 1.58;
    color: #4d5156;
    margin: 0 0 0.65rem 0;
}

/* CALLOUTS (inline text · separated by ·) */
.ad-preview-callouts {
    font-family: arial, sans-serif;
    font-size: 13.5px;
    color: #4d5156;
    line-height: 1.55;
    margin-bottom: 0.55rem;
    word-break: break-word;
}

/* SITELINK PILLS (2-col grid matching Google) */
.sitelink-preview-pills-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.6rem;
    margin: 0.25rem 0 0.75rem 0;
}

.sitelink-pill-item {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid #dadce0;
    border-radius: 9999px;
    font-family: arial, sans-serif;
    font-size: 13px;
    color: #1a0dab;
    background: #ffffff;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sitelink-pill-item:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    text-decoration: underline;
}

/* BOTTOM BAR — Location + Call */
.ad-preview-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(32, 33, 36, 0.06);
    flex-wrap: wrap;
}

.ad-preview-location-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: arial, sans-serif;
    font-size: 12.5px;
    color: #3c4043;
    flex: 1;
    min-width: 0;
}

.ad-preview-location-text svg {
    color: #34a853;
    flex-shrink: 0;
}

.ad-preview-location-text span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-preview-call-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #dadce0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1a73e8;
    background: #ffffff;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.ad-preview-call-action:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.ad-preview-call-action svg {
    color: #1a73e8;
}

/* ---------- ORGANIC RESULT CARD (Position #2) ---------- */
.organic-render-card {
    position: relative;
    background: rgba(248, 249, 251, 0.7);
    border: 1px dashed rgba(32, 33, 36, 0.12);
    border-radius: 14px;
    padding: 1rem 1.15rem;
}

.organic-position-tag {
    position: absolute;
    top: -11px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    background: #5f6368;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
}

.organic-render-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0.45rem;
    font-family: arial, sans-serif;
    font-size: 12px;
    color: #3c4043;
}

.organic-render-breadcrumb {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: #5f6368;
}

.organic-render-title {
    font-family: arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    color: #1a0dab;
    margin: 0 0 0.35rem 0;
}

.organic-render-desc {
    font-family: arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.58;
    color: #4d5156;
    margin: 0;
    opacity: 0.88;
}

/* ---------- WHY ADS WIN BANNER ---------- */
.why-ads-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: linear-gradient(135deg, #FEF7E0 0%, #FFF8E7 100%);
    border: 1px solid rgba(251, 188, 5, 0.35);
    border-radius: 14px;
    max-width: 620px;
    margin: 0.75rem auto 0.25rem auto;
}

.why-ads-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #FBBC05;
    color: #202124;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(227, 116, 0, 0.3);
}

.why-ads-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: #202124;
    margin-bottom: 2px;
}

.why-ads-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: #3c4043;
}

.why-ads-text strong {
    color: #E37400;
    font-weight: 700;
}

/* CTA BELOW PREVIEW */
.ad-builder-bottom-cta {
    max-width: 620px;
    margin: 1rem auto 0 auto;
}

.btn-make-ad-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: var(--ink);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 10px 28px -8px rgba(32, 33, 36, 0.35);
    transition: all 200ms ease;
}

.btn-make-ad-live:hover {
    background: #FBBC05;
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -8px rgba(251, 188, 5, 0.5);
}

.btn-make-ad-live svg {
    transition: transform 200ms ease;
}

.btn-make-ad-live:hover svg {
    transform: translateX(4px);
}

/* ============================================================
   MOBILE PHONE FRAME
   ============================================================ */
.mobile-phone-frame {
    max-width: 380px;
    margin: 0.5rem auto;
    background: #202124;
    border-radius: 42px;
    padding: 12px;
    box-shadow:
        0 0 0 2px #5f6368,
        0 20px 60px -10px rgba(32, 33, 36, 0.4),
        0 0 0 8px rgba(32, 33, 36, 0.06);
    position: relative;
}

.mobile-phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 26px;
    background: #000000;
    border-radius: 20px;
    z-index: 3;
}

.mobile-google-header {
    background: #ffffff;
    border-radius: 30px 30px 0 0;
    padding: 3.25rem 1rem 0.75rem 1rem;
}

.mobile-ad-card-inner {
    background: #ffffff;
    border-radius: 0 0 30px 30px;
    padding: 0.25rem 1rem 1.25rem 1rem;
    max-height: 540px;
    overflow-y: auto;
}

.mobile-ad-card-inner::-webkit-scrollbar {
    width: 4px;
}

.mobile-ad-card-inner::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 4px;
}

/* Mobile-specific adjustments */
.mobile-ad-card-inner .google-search-bar-pill {
    padding: 0.5rem 0.85rem;
    font-size: 13px;
}

.mobile-ad-card-inner .google-filter-strip {
    font-size: 11.5px;
    gap: 0.875rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.mobile-ad-card-inner .google-filter-strip::-webkit-scrollbar {
    display: none;
}

.mobile-ad-card-inner .ad-preview-title {
    font-size: 17px;
}

.mobile-ad-card-inner .ad-preview-description {
    font-size: 13px;
}

.mobile-ad-card-inner .ad-preview-callouts {
    font-size: 12.5px;
}

.mobile-ad-card-inner .sitelink-pill-item {
    font-size: 12px;
    padding: 0.4rem 0.65rem;
}

.mobile-ad-card-inner .organic-render-title {
    font-size: 16px;
}

.mobile-ad-card-inner .organic-render-desc {
    font-size: 12.5px;
}

.mobile-ad-card-inner .why-ads-title {
    font-size: 13px;
}

.mobile-ad-card-inner .why-ads-text {
    font-size: 11.5px;
}

/* ============================================================
   MODAL EDITOR WINDOW
   ============================================================ */
.builder-form-wrapper {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999999 !important;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    padding-top: 5rem;
}

.builder-form-wrapper.is-open {
    display: flex;
}

.builder-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 21, 24, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

.builder-form-container {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 28px 70px -10px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    overflow: hidden;
    animation: modalPopIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
}

@keyframes modalPopIn {
    0% {
        transform: scale(0.94) translateY(16px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.builder-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--hairline);
    background: #fafbfc;
    flex-shrink: 0;
}

.builder-modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    border: 1px solid var(--hairline);
    background: #ffffff;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 200ms ease;
    flex-shrink: 0;
}

.builder-modal-close-btn:hover {
    background: #f1f3f4;
}

.builder-form-scrollable-body {
    padding: 1.35rem 1.4rem 1rem 1.4rem;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
}

.builder-modal-footer {
    padding: 0.9rem 1.4rem;
    border-top: 1px solid var(--hairline);
    background: #fafbfc;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-modal-apply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ink);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    padding: 0.65rem 1.35rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease, transform 150ms ease;
}

.btn-modal-apply:hover {
    background: #fbbc05;
    color: var(--ink);
    transform: translateY(-1px);
}

.btn-modal-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--soft);
    font-size: 12.5px;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--hairline);
    cursor: pointer;
    transition: all 200ms ease;
}

.btn-modal-reset:hover {
    color: var(--ink);
    border-color: rgba(234, 67, 53, 0.4);
    background: rgba(234, 67, 53, 0.04);
}

/* ============================================================
   ACCORDION CARDS INSIDE MODAL
   ============================================================ */
.accordion-card {
    background: #ffffff;
    border: 1px solid var(--hairline);
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.accordion-card.is-open {
    border-color: rgba(66, 133, 244, 0.3);
    box-shadow: 0 4px 14px -4px rgba(26, 115, 232, 0.1);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.05rem;
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
}

.accordion-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.accordion-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.accordion-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
}

.accordion-subtitle {
    font-size: 12px;
    color: var(--soft);
    margin-top: 2px;
    line-height: 1.4;
}

.accordion-chevron {
    transition: transform 200ms ease;
    color: var(--soft);
    flex-shrink: 0;
}

.accordion-card.is-open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0 1.05rem 1.05rem 1.05rem;
    animation: slideDown 200ms ease;
}

.accordion-card.is-open .accordion-body {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   TOGGLE CHECKBOXES (Custom styled)
   ============================================================ */
.toggle-checkbox-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.builder-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.builder-toggle-visual {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    background: #dadce0;
    border-radius: 9999px;
    transition: background-color 200ms ease;
    flex-shrink: 0;
}

.builder-toggle-visual::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.builder-toggle:checked+.builder-toggle-visual {
    background: #1a73e8;
}

.builder-toggle:checked+.builder-toggle-visual::after {
    transform: translateX(14px);
}

/* ============================================================
   FORM INPUTS (builder field groups)
   ============================================================ */
.builder-field-group {
    margin-bottom: 0.85rem;
}

.builder-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    gap: 0.5rem;
}

.builder-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--soft);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.char-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--soft);
    padding: 2px 7px;
    background: #f1f3f4;
    border-radius: 9999px;
    min-width: 26px;
    text-align: center;
    transition: all 150ms ease;
}

.char-badge.is-warning {
    background: rgba(251, 188, 5, 0.2);
    color: #E37400;
}

.char-badge.is-error {
    background: rgba(234, 67, 53, 0.15);
    color: #c5221f;
}

.builder-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink);
    background: #ffffff;
    font-family: var(--font-sans);
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.builder-input::placeholder {
    color: #9aa0a6;
}

.builder-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.12);
}

.builder-textarea {
    resize: vertical;
    line-height: 1.5;
    min-height: 52px;
}

.sub-input-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .sub-input-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .preview-card-wrapper {
        padding: 1.1rem;
        border-radius: 1.25rem;
    }

    .device-tab-bar {
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
    }

    .device-tab {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.75rem;
    }

    .sponsored-ad-render-card,
    .organic-render-card {
        padding: 0.9rem;
        border-radius: 12px;
        margin-top: 15px;
    }

    .sitelink-preview-pills-container {
        grid-template-columns: 1fr;
    }

    .ad-preview-title {
        font-size: 17.5px;
    }

    .organic-render-title {
        font-size: 16px;
    }

    .builder-form-container {
        border-radius: 1.25rem;
        max-height: 92vh;
    }

    .builder-modal-header {
        padding: 1rem 1.1rem;
    }

    .builder-form-scrollable-body {
        padding: 1.1rem 1.1rem 0.85rem 1.1rem;
    }

    .builder-modal-footer {
        padding: 0.85rem 1.1rem;
    }
}

@media (max-width: 480px) {
    .google-logo-svg {
        width: 78px;
        height: auto;
    }

    .ad-preview-bottom-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ad-preview-call-action {
        justify-content: center;
        width: 100%;
    }

    .ad-preview-location-text {
        width: 100%;
    }

    .btn-modal-reset {
        padding: 0.55rem 0.8rem;
        font-size: 12px;
    }

    .btn-modal-apply {
        padding: 0.55rem 1.1rem;
        font-size: 13px;
    }
}