/**
 * EmbedPress admin dashboard: visual refresh.
 *
 * Loads after settings.css and admin.css and only restyles the existing
 * markup. It changes no class names, setting keys or behaviour. Every rule
 * is scoped to the dashboard wrapper so other admin pages stay untouched.
 */

.template__wrapper {
    --ep-primary: #5b4e96;
    --ep-primary-hover: #4a3e82;
    --ep-primary-soft: #f1effa;
    --ep-primary-ring: rgba(91, 78, 150, 0.18);
    --ep-text: #1d2236;
    --ep-text-2: #464c63;
    --ep-muted: #6b7189;
    --ep-border: #e5e7ef;
    --ep-border-strong: #d5d8e4;
    --ep-bg: #f6f7fb;
    --ep-surface: #ffffff;
    --ep-surface-2: #fafbfd;
    --ep-radius: 12px;
    --ep-radius-sm: 8px;
    --ep-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    --ep-shadow-hover: 0 4px 12px rgba(16, 24, 40, 0.08);

    background: var(--ep-bg) !important;
    padding: 24px 24px 40px !important;
    color: var(--ep-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.template__wrapper .embedpress__container {
    max-width: 1320px;
    margin: 0 auto;
}

/* ---------- Header ---------- */

.template__wrapper .embedpress-header {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    padding: 12px 20px;
    margin-bottom: 20px;
    gap: 16px;
}

.template__wrapper .embedpress-header .site__logo img {
    height: 32px;
    width: auto;
}

.template__wrapper .embedpress-header > p {
    font-size: 14px;
    color: var(--ep-muted);
    margin: 0;
}

.template__wrapper .embedpress-header .comunity-link {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-2);
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.template__wrapper .embedpress-header .comunity-link:hover {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
}

/* ---------- Layout and sidebar ---------- */

.template__wrapper .embedpress-body {
    gap: 20px;
    align-items: flex-start;
}

.template__wrapper .embedpress-sidebar-wrapper {
    flex: 0 0 232px;
}

.template__wrapper .embedpress-sidebar {
    width: 100%;
    flex-basis: auto;
    margin: 0 !important;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    padding: 8px;
}

.template__wrapper .embedpress-sidebar .sidebar__item {
    margin: 0 0 2px;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: var(--ep-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text-2);
    transition: background .15s ease, color .15s ease;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin: 0 !important;
    flex: 0 0 20px;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link > span svg {
    max-width: 18px;
    max-height: 18px;
    width: auto !important;
    height: auto !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link:hover {
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
}

/* settings.css turns sidebar icons white on hover, because its hover
   background was solid purple. The hover background is now light, so tint
   the icon with the primary colour instead. Each icon keeps its own model:
   stroke icons change the stroke, filled icons change the fill. Only the
   link's own icon (its first span) is tinted, not the Premium crown. */
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link:not(.active):hover > span:not(.embedpress-tag) svg[fill]:not([fill="none"]),
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link:not(.active):hover > span:not(.embedpress-tag) svg path[fill]:not([fill="none"]) {
    fill: var(--ep-primary) !important;
}

/* The Settings icon is a filled icon, but it shares the .general class with
   Hub, whose hover rule adds a white stroke. Keep filled icons stroke-free. */
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link:not(.active):hover > span:not(.embedpress-tag) svg[fill]:not([fill="none"]) path:not([stroke]) {
    stroke: none !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link:not(.active):hover > span:not(.embedpress-tag) svg path[stroke]:not([stroke="none"]),
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.ads-icon:not(.active):hover > span:not(.embedpress-tag) svg path {
    stroke: var(--ep-primary) !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.active,
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.active:hover {
    background: var(--ep-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(91, 78, 150, 0.25);
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.active svg path[stroke] {
    stroke: #ffffff;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.active svg[fill]:not([fill="none"]),
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.active svg path[fill]:not([fill="none"]) {
    fill: #ffffff;
}

.template__wrapper .embedpress-sidebar hr,
.template__wrapper .embedpress-sidebar .sidebar__divider {
    border-color: var(--ep-border) !important;
}

/* ---------- Content cards ---------- */

.template__wrapper .embedpress-content > .background__white,
.template__wrapper .embedpress-content > .embedpress__settings,
.template__wrapper .embedpress-content > .source-settings-page,
.template__wrapper .embedpress-content .embedpress-popular-content-wrapper,
.template__wrapper .embedpress-content .embedpress-banner-box {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius) !important;
    box-shadow: var(--ep-shadow);
}

.template__wrapper .embedpress-content > .background__white,
.template__wrapper .embedpress-content > .embedpress__settings {
    padding: 24px 28px !important;
}

.template__wrapper .embedpress-content > div + div:not(.embedpress-toast__message) {
    margin-top: 20px;
}

.template__wrapper .embedpress-content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ep-text);
    letter-spacing: -0.01em;
}

.template__wrapper .embedpress-content > .embedpress__settings > h3,
.template__wrapper .embedpress-content .embedpress--elements__wrap > h3 {
    margin: 0 0 4px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--ep-border);
}

/* ---------- Settings forms ---------- */

.template__wrapper .embedpress__settings__form .mb-20 {
    margin-bottom: 24px;
}

/* Sub-section headings inside a form, such as "Custom Logo". */
.template__wrapper .embedpress__settings__form form > h3 {
    margin: 28px 0 0;
    padding: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ep-text);
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .embedpress__settings__form .form__group {
    align-items: center;
    gap: 24px;
    margin: 0 !important;
    padding: 16px 0;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .embedpress__settings__form .form__group:last-child {
    border-bottom: 0;
}

.template__wrapper .embedpress__settings__form .form__group .form__label {
    flex: 0 0 280px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text);
}

.template__wrapper .embedpress__settings__form .form__group .form__label .isPro {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 2px 6px;
    vertical-align: 1px;
}

.template__wrapper .embedpress__settings__form .form__group .form__control__wrap > p,
.template__wrapper .embedpress__settings__form .form__group .form__control__wrap .description {
    font-size: 13px;
    color: var(--ep-muted);
}

.template__wrapper .ep-coming-soon {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
    font-size: 11px;
    font-weight: 600;
    vertical-align: 1px;
}

@media (max-width: 1199px) {
    .template__wrapper .embedpress__settings__form .form__group .form__label {
        flex-basis: 220px;
    }
}

@media (max-width: 767px) {
    .template__wrapper .embedpress__settings__form .form__group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .template__wrapper .embedpress__settings__form .form__group .form__label {
        flex-basis: auto;
    }

    .template__wrapper .embedpress__settings__form .form__group .form__label:after {
        content: none;
    }
}

/* Text inputs, selects, number fields */

.template__wrapper .form__control,
.template__wrapper input[type="text"].form__control,
.template__wrapper input[type="number"].form__control,
.template__wrapper input[type="url"].form__control,
.template__wrapper input[type="password"].form__control,
.template__wrapper select.form__control,
.template__wrapper textarea.form__control {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--ep-border-strong) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-surface);
    color: var(--ep-text);
    font-size: 14px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.template__wrapper .form__control:hover {
    border-color: #b9bdd0 !important;
}

.template__wrapper .form__control:focus {
    outline: none;
    border-color: var(--ep-primary) !important;
    box-shadow: 0 0 0 3px var(--ep-primary-ring) !important;
}

.template__wrapper .embedpress__settings__form .input__flex .form__control[type="number"] {
    width: 110px;
}

.template__wrapper .embedpress__settings__form .input__flex .frame__unit {
    color: var(--ep-muted);
    font-size: 13px;
    margin-left: 8px;
}

/* Toggles: a plain switch, without the boxed OFF / ON text. */

.template__wrapper .input__switch span {
    width: 36px;
    height: 20px;
    background: #d5d8e4;
    border-radius: 999px;
    vertical-align: middle;
    transition: background .2s ease;
}

.template__wrapper .input__switch span:before {
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2);
    transition: left .2s ease;
}

.template__wrapper .input__switch input:checked ~ span {
    background: var(--ep-primary);
}

.template__wrapper .input__switch input:checked ~ span:before {
    left: 18px;
}

.template__wrapper .input__switch input:disabled ~ span,
.template__wrapper .input__switch.isPro span {
    opacity: .5;
    cursor: not-allowed;
}

.template__wrapper .input__switch:focus-within span {
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

.template__wrapper .embedpress__settings__form .form__group .input__switch {
    margin: 0 !important;
}

.template__wrapper .input__switch.switch__text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
}

.template__wrapper .input__switch.switch__text:before,
.template__wrapper .input__switch.switch__text:after {
    content: none;
}

.template__wrapper .input__switch .logo__adjust__toggler {
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-primary);
}

/* ---------- Buttons ---------- */

.template__wrapper .button.button__themeColor,
.template__wrapper .embedpress-submit-btn,
.template__wrapper .embedpress-btn.embedpress-license-btn,
.template__wrapper .embedpress-introduction-left-panel .embedpress-btn,
.template__wrapper .embdpress-compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px !important;
    border: 1px solid var(--ep-primary) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-primary) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.template__wrapper .button.button__themeColor:hover,
.template__wrapper .embedpress-submit-btn:hover,
.template__wrapper .embedpress-btn.embedpress-license-btn:hover,
.template__wrapper .embdpress-compare-btn:hover {
    background: var(--ep-primary-hover) !important;
    border-color: var(--ep-primary-hover) !important;
}

.template__wrapper .button.button__themeColor:focus-visible,
.template__wrapper .embedpress-submit-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* The save button stays disabled until a field changes. Keep it readable. */
.template__wrapper .embedpress-submit-btn:disabled,
.template__wrapper .embedpress-submit-btn[disabled] {
    background: var(--ep-primary-soft) !important;
    border-color: var(--ep-primary-soft) !important;
    color: var(--ep-primary) !important;
    box-shadow: none;
    opacity: .7;
    cursor: not-allowed;
}

.template__wrapper .button.button__redColor {
    min-height: 38px;
    padding: 0 18px;
    border-radius: var(--ep-radius-sm);
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Elements grid ---------- */

.template__wrapper .embedpress__row.grid__3 {
    gap: 12px;
}

.template__wrapper .embedpress--elements__wrap .embedpress__row {
    margin-top: 20px;
}

.template__wrapper .element__item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 12px 16px !important;
    background: var(--ep-surface-2) !important;
    border: 1px solid var(--ep-border);
    border-radius: 10px !important;
    transition: border-color .15s ease, background .15s ease;
}

.template__wrapper .element__item:hover {
    border-color: var(--ep-border-strong);
    background: var(--ep-surface) !important;
}

.template__wrapper .element__item h5 {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.35;
    color: var(--ep-text) !important;
    margin: 0;
}

.template__wrapper .element__item .has__question {
    color: #a3a8bd;
    margin-right: auto;
}

.template__wrapper .element__item .has__question:hover {
    color: var(--ep-primary);
}

.template__wrapper .element__item .has__question .ep-icon {
    font-size: 14px;
}

/* ---------- Sources ---------- */

.template__wrapper .source-settings-page {
    padding: 24px 28px;
}

.template__wrapper .source-item {
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.template__wrapper .source-item:hover {
    background: var(--ep-surface);
    border-color: var(--ep-border-strong);
    box-shadow: var(--ep-shadow-hover);
}

.template__wrapper .source-item .source-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text);
}

/* ---------- Hub ---------- */

.template__wrapper .embedPress-introduction-panel-wrapper {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    margin-bottom: 20px;
}

/* "Ready to publish your first embed?" card */

.template__wrapper .embedPress-introduction-panel-wrapper .embedPress-introduction-left-panel {
    padding: 20px 44px 20px 20px;
    gap: 24px;
    align-items: center;
}

/* Video guide: a compact 16:9 thumbnail with a caption under it */

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video {
    flex: 0 0 208px;
    width: 208px;
    margin: 0;
    padding: 8px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--ep-primary-soft);
    border: 1px solid #e4e0f3;
    border-radius: 12px;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video:hover {
    border-color: #cfc8ea;
    background: #ece8f8;
    box-shadow: 0 8px 20px -12px rgba(91, 78, 150, .45);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video:focus-visible {
    outline: none;
    border-color: var(--ep-primary);
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .4s ease;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video:hover .embedpress-intro-video-thumb img {
    transform: scale(1.04);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video .embedpress-play-icon {
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding-left: 3px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #ffffff;
    color: var(--ep-primary);
    box-shadow: 0 6px 16px -4px rgba(30, 24, 59, .45);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video .embedpress-play-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #ffffff;
    opacity: .5;
    z-index: -1;
    animation: ep-intro-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video:hover .embedpress-play-icon {
    transform: translate(-50%, -50%) scale(1.08);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video-caption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 4px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ep-text);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video-sub {
    font-size: 12px;
    line-height: 1.35;
    color: var(--ep-text-2);
}
}

@media only screen and (min-width: 1301px) {
    .template__wrapper .embedPress-introduction-panel-wrapper .embedPress-introduction-left-panel {
        flex: 0 0 56%;
        width: 56%;
        box-sizing: border-box;
    }

    .template__wrapper .embedPress-introduction-panel-wrapper .embedPress-introduction-right-panel {
        flex: 1 1 0;
        min-width: 0;
    }
}

@keyframes ep-intro-pulse {
    0% { transform: scale(1); opacity: .5; }
    80%, 100% { transform: scale(1.7); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video .embedpress-play-icon::before {
        animation: none;
    }
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedPress-text-wrapper {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedPress-left-panel-header {
    font-size: 18px !important;
    font-weight: 600;
    color: var(--ep-text);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0 0 8px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-progress-container {
    max-width: 320px;
    height: 5px;
    margin-bottom: 0;
    background: #ece9f5;
    border-radius: 999px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-progress-bar {
    background: linear-gradient(90deg, #7a6cc4 0%, var(--ep-primary) 100%);
    border-radius: 999px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-container {
    margin-top: 14px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-nav {
    gap: 2px;
    padding: 3px;
    margin-bottom: 12px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-btn {
    padding: 5px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ep-muted);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-btn:hover {
    background: var(--ep-surface);
    color: var(--ep-text);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-btn.active {
    background: var(--ep-surface);
    color: var(--ep-primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px var(--ep-border);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-btn:focus-visible {
    outline: 2px solid var(--ep-primary-ring);
    outline-offset: 1px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-panel.active {
    animation: ep-intro-fade .2s ease;
}

@keyframes ep-intro-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-header {
    font-size: 13px !important;
    font-weight: 600;
    color: var(--ep-text);
    margin: 0 0 8px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list {
    list-style: none;
    counter-reset: ep-step;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list-item {
    counter-increment: ep-step;
    position: relative;
    margin: 0;
    padding-left: 30px;
    min-height: 20px;
    font-size: 13px !important;
    line-height: 1.55;
    color: var(--ep-text-2);
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list-item::before {
    content: counter(ep-step);
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 23px;
    bottom: -5px;
    left: 9.5px;
    width: 1px;
    background: #e4e0f3;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list-item a {
    font-weight: 500;
    color: var(--ep-primary);
    text-decoration: none;
    white-space: nowrap;
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list-item a::after {
    content: " \2192";
}

.template__wrapper .embedPress-introduction-panel-wrapper .embedpress-follow-steps-list-item a:hover {
    text-decoration: underline;
}

@media only screen and (max-width: 782px) {
    .template__wrapper .embedPress-introduction-panel-wrapper .embedPress-introduction-left-panel {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }

    .template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video {
        flex-basis: auto;
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 8px;
    }

    .template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-video-thumb {
        flex: 0 0 140px;
    }

    .template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-nav {
        display: flex;
    }

    .template__wrapper .embedPress-introduction-panel-wrapper .embedpress-intro-tab-btn {
        flex: 1 1 0;
        padding: 7px 8px;
    }
}

.template__wrapper .embedpress-font-xl,
.template__wrapper .embedpress-banner-header,
.template__wrapper .embedpress-popular-types-header {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    color: var(--ep-text);
    letter-spacing: -0.01em;
}

.template__wrapper .embedpress-font-l {
    font-size: 16px !important;
    line-height: 1.4;
}

.template__wrapper .embedpress-banner-sub-header,
.template__wrapper .embedpress-introduction-left-panel p {
    font-size: 14px !important;
    line-height: 1.6;
    color: var(--ep-muted) !important;
}

.template__wrapper .embedpress-banner-box {
    padding: 24px !important;
}

.template__wrapper .embedpress-banner-wrapper {
    margin-bottom: 20px !important;
}

.template__wrapper .embedpress-popular-content-wrapper {
    padding: 24px !important;
}

.template__wrapper .embedpress-popular-content-body {
    background: var(--ep-surface-2) !important;
    border: 1px solid var(--ep-border);
    border-radius: 10px !important;
}

.template__wrapper .embedpress-content-card-header {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--ep-text-2) !important;
}

.template__wrapper .embedpress-popular-content-list-item {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm) !important;
    box-shadow: none !important;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.template__wrapper .embedpress-popular-content-list-item:hover {
    border-color: var(--ep-border-strong);
    box-shadow: var(--ep-shadow-hover) !important;
}

.template__wrapper .embdpress-underline {
    font-size: 13px !important;
    font-weight: 500;
    color: var(--ep-primary) !important;
    text-decoration: none !important;
}

.template__wrapper .embdpress-underline:hover {
    text-decoration: underline !important;
}

/* "Get Started with EmbedPress" card */

.template__wrapper .intro-banner {
    margin: 0 0 20px;
    padding: 16px;
    gap: 20px;
    align-items: center;
    background:
        radial-gradient(circle at 100% 0, rgba(91, 78, 150, .10) 0, rgba(91, 78, 150, 0) 45%),
        var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
}

.template__wrapper .intro-banner .video-container {
    flex: 0 0 auto;
    margin: 0;
}

.template__wrapper .intro-banner .video-container .img-box {
    display: block;
    width: 200px;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
}

.template__wrapper .intro-banner .video-container .img-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform .3s ease;
}

.template__wrapper .intro-banner .video-container .img-box:hover img {
    transform: scale(1.04);
}

.template__wrapper .intro-banner .img-box button.video-play_btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: #ffffff;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 18px -6px rgba(30, 24, 59, .6);
    transition: transform .2s ease;
}

.template__wrapper .intro-banner .img-box button.video-play_btn svg {
    width: 14px;
    height: 15px;
    margin-left: 2px;
}

.template__wrapper .intro-banner .img-box button.video-play_btn svg path {
    fill: var(--ep-primary);
}

.template__wrapper .intro-banner .img-box:hover button.video-play_btn {
    transform: translate(-50%, -50%) scale(1.08);
}

.template__wrapper .intro-banner .intro-text_wrapper {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.template__wrapper .intro-banner h4.intro-header {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ep-text);
}

.template__wrapper .intro-banner p.intro-sub_header {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ep-muted);
}

.template__wrapper .intro-banner a.intro-docu_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--ep-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.template__wrapper .intro-banner a.intro-docu_btn::after {
    content: "\2192";
}

.template__wrapper .intro-banner a.intro-docu_btn:hover,
.template__wrapper .intro-banner a.intro-docu_btn:focus-visible {
    background: none;
    color: var(--ep-primary-hover);
    text-decoration: underline;
}

@media only screen and (max-width: 768px) {
    .template__wrapper .intro-banner {
        align-items: stretch;
    }

    .template__wrapper .intro-banner .video-container .img-box {
        width: 100%;
    }

    .template__wrapper .intro-banner .video-container .img-box img {
        height: 160px;
        object-fit: cover;
    }

    .template__wrapper .intro-banner .intro-text_wrapper {
        margin: 0;
    }
}

/* Free version: Pro upgrade card and branding card (templates/hub.php) */

.template__wrapper .embedpress-hub-section .ep-upsell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.template__wrapper .embedpress-hub-section .ep-upsell__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    box-sizing: border-box;
}

.template__wrapper .embedpress-hub-section .ep-upsell__card--pro {
    background:
        radial-gradient(420px 180px at 100% 0%, rgba(91, 78, 150, .09), rgba(91, 78, 150, 0) 70%),
        var(--ep-surface);
}

.template__wrapper .embedpress-hub-section .ep-upsell__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template__wrapper .embedpress-hub-section .ep-upsell__icon {
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.template__wrapper .embedpress-hub-section .ep-upsell__icon--crown {
    color: #ffffff;
    background: linear-gradient(135deg, #ffb547 0%, #f08c1a 100%);
    box-shadow: 0 6px 14px -6px rgba(240, 140, 26, .7);
}

.template__wrapper .embedpress-hub-section .ep-upsell__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 1px;
    padding: 0;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ep-text);
}

.template__wrapper .embedpress-hub-section .ep-upsell__text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ep-muted);
}

.template__wrapper .embedpress-hub-section .ep-upsell__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.template__wrapper .embedpress-hub-section .ep-upsell__features li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--ep-text-2);
}

.template__wrapper .embedpress-hub-section .ep-upsell__features svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    padding: 5px;
    box-sizing: border-box;
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
    border-radius: 7px;
}

.template__wrapper .embedpress-hub-section .ep-upsell__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    min-height: 45px;
    box-sizing: border-box;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--ep-border);
}

.template__wrapper .embedpress-hub-section .ep-upsell__btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    background: var(--ep-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.template__wrapper .embedpress-hub-section .ep-upsell__btn:hover,
.template__wrapper .embedpress-hub-section .ep-upsell__btn:focus-visible {
    color: #ffffff;
    background: var(--ep-primary-hover);
    box-shadow: 0 6px 16px -8px rgba(91, 78, 150, .7);
}

.template__wrapper .embedpress-hub-section .ep-upsell__link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .embedpress-hub-section .ep-upsell__link::after {
    content: " \2192";
    white-space: pre;
}

.template__wrapper .embedpress-hub-section .ep-upsell__link:hover {
    color: var(--ep-primary-hover);
    text-decoration: underline;
}

/* Branding card: text on the left, a dashed badge preview on the right. */

.template__wrapper .embedpress-hub-section .ep-upsell__card--brand {
    flex-direction: row;
    align-items: stretch;
    gap: 16px;
    background: #f7f5fd;
    border: 1px dashed #c9c0ea;
    box-shadow: none;
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.template__wrapper .embedpress-hub-section .ep-upsell__icon--brand {
    background: #ffffff;
    border: 1px solid #e4e0f3;
}

.template__wrapper .embedpress-hub-section .ep-upsell__icon--brand img {
    width: 20px;
    height: 20px;
    opacity: .75;
}

.template__wrapper .embedpress-hub-section .ep-upsell__card--brand .ep-upsell__text {
    color: var(--ep-text-2);
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-list li {
    position: relative;
    margin: 0;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ep-text-2);
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-list li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 3px;
    width: 6px;
    height: 6px;
    background: #b3a7e3;
    border-radius: 50%;
}

.template__wrapper .embedpress-hub-section .ep-upsell__card--brand .ep-upsell__actions {
    border-top-color: #e4dff4;
}

.template__wrapper .embedpress-hub-section .ep-upsell__strong-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .embedpress-hub-section .ep-upsell__strong-link:hover {
    color: var(--ep-primary-hover);
    text-decoration: underline;
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-preview {
    position: relative;
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    min-height: 104px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px dashed #d8d1ef;
    border-radius: 10px;
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-preview img {
    width: 64px;
    height: auto;
    opacity: .28;
}

.template__wrapper .embedpress-hub-section .ep-upsell__brand-crown {
    position: absolute;
    top: -10px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fff4dc;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(240, 140, 26, .35);
}

/* Mid widths: the cards are narrow, so the decorative preview gives its room to the text. */
@media only screen and (min-width: 1281px) and (max-width: 1439px) {
    .template__wrapper .embedpress-hub-section .ep-upsell__brand-preview {
        display: none;
    }
}

@media only screen and (max-width: 1280px) {
    .template__wrapper .embedpress-hub-section .ep-upsell {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media only screen and (max-width: 480px) {
    .template__wrapper .embedpress-hub-section .ep-upsell__brand-preview {
        display: none;
    }
}

@media only screen and (max-width: 600px) {
    .template__wrapper .embedpress-hub-section .ep-upsell__features {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* License Key + Brand Your Work cards (Pro) */

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper {
    padding: 20px !important;
    background:
        radial-gradient(circle at 100% 0, rgba(91, 78, 150, .08) 0, rgba(91, 78, 150, 0) 45%),
        var(--ep-surface);
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper > .embedpress-flex,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-left-content > .embedpress-flex {
    gap: 10px;
    margin-bottom: 8px !important;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .banner-icon,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .banner-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--ep-primary-soft);
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .banner-icon img,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .banner-icon img {
    width: auto;
    height: 18px;
    margin: 0;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .embedpress-banner-header,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-banner-header {
    margin: 0;
}

.template__wrapper .embedpress-hub-section .embedpress-banner .embedpress-license-wrapper .embedpress-banner-sub-header,
.template__wrapper .embedpress-hub-section .embedpress-banner .embedpress-upload-brand-wrapper .embedpress-banner-sub-header {
    padding-left: 0;
    margin: 0 0 14px !important;
    font-size: 13px !important;
    line-height: 1.55;
    color: var(--ep-muted) !important;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .embedpress-banner-secondary-header {
    margin: 0 0 6px;
    font-size: 14px !important;
    text-decoration: none;
    color: var(--ep-text);
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper:has(.valid-msg) .banner-icon {
    background: #e9f8f1;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper:has(.error-msg) .banner-icon {
    background: #fdecec;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .banner-icon {
    color: var(--ep-primary);
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper:has(.valid-msg) .banner-icon {
    color: #12a86b;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper:has(.error-msg) .banner-icon {
    color: #e5484d;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .banner-icon img {
    display: none;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .banner-icon::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3Ccircle cx='12' cy='15.5' r='1' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3Ccircle cx='12' cy='15.5' r='1' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* License key field */

.template__wrapper .embedpress-hub-section .embedpress-license-input-wrapper {
    margin: 0 0 14px !important;
    padding: 4px 6px 4px 4px;
    align-items: center;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
}

.template__wrapper .embedpress-hub-section .embedpress-license-input {
    height: 36px;
    padding: 0 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--ep-text-2);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.template__wrapper .embedpress-hub-section .embedpress-active-btn {
    flex: 0 0 auto;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e9f8f1;
    color: #0f7a50;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.template__wrapper .embedpress-hub-section .embedpress-active-btn svg path {
    fill: currentColor;
}

/* Buttons: plain text links */

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .embedpress-license-btn,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-branding-options-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
    color: var(--ep-primary) !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .embedpress-license-btn > span:first-child {
    display: none;
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .embedpress-license-btn:not(.embedpress-manages-license-btn)::after,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-branding-options-btn::after {
    content: "\2192";
}

.template__wrapper .embedpress-hub-section .embedpress-license-wrapper .embedpress-license-btn:hover,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-branding-options-btn:hover {
    color: var(--ep-primary-hover) !important;
    text-decoration: underline;
}

/* Brand card layout + logo preview */

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper {
    gap: 20px;
}

.template__wrapper .embedpress-hub-section .embedpress-banner .embedpress-upload-brand-wrapper .embedpress-left-content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0;
}

.template__wrapper .embedpress-hub-section .embedpress-banner .embedpress-upload-brand-wrapper .embedpress-right-content {
    flex: 0 0 136px;
    width: 136px;
    padding: 10px;
    gap: 10px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 12px;
    box-sizing: border-box;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .brand-preview-area,
.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-preview-area {
    width: 100%;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-preview-area {
    height: 76px;
    margin: 0;
    background: var(--ep-surface)
        repeating-conic-gradient(#f3f2f8 0% 25%, transparent 0% 50%) 0 0 / 12px 12px;
    border: 1px dashed #cfc8ea;
    border-radius: 8px;
    color: var(--ep-muted);
    font-size: 12px;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-preview-area img {
    max-width: 85%;
    max-height: 60px;
    object-fit: contain;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .preview-actions-button {
    gap: 6px;
    margin: 0;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-upload-btn {
    height: 28px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ep-primary);
    background: var(--ep-surface);
    border: 1px solid var(--ep-border-strong);
    transition: border-color .15s ease, background .15s ease;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-upload-btn:hover {
    border-color: var(--ep-primary);
    background: var(--ep-primary-soft);
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-upload-btn.remove-btn {
    color: #c03535;
}

.template__wrapper .embedpress-hub-section .embedpress-upload-brand-wrapper .embedpress-upload-btn.remove-btn:hover {
    border-color: #e5484d;
    background: #fdecec;
}

/* ---------- Footer cards ---------- */

.template__wrapper .embedpress-body + .background__white,
.template__wrapper .embedpress__container > .background__white:last-child {
    padding: 0 !important;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.template__wrapper .embedpress-card {
    padding: 20px 20px 20px 76px !important;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border) !important;
    border-radius: var(--ep-radius) !important;
    box-shadow: var(--ep-shadow);
}

.template__wrapper .embedpress-card .icon {
    top: 20px !important;
    left: 20px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: var(--ep-primary-soft) !important;
}

.template__wrapper .embedpress-card h3,
.template__wrapper .embedpress-card h4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--ep-text) !important;
    margin: 0 0 6px !important;
}

.template__wrapper .embedpress-card p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--ep-muted) !important;
    margin: 0 0 12px !important;
}

.template__wrapper .embedpress-card a {
    padding: 0 !important;
    background: none !important;
    font-size: 13px !important;
    font-weight: 500;
    color: var(--ep-primary) !important;
}

/* ---------- License ---------- */

.template__wrapper .embedpress-license__details {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius) !important;
    box-shadow: var(--ep-shadow);
}

.template__wrapper .embedpress-license__details .license__content {
    padding: 32px !important;
}

.template__wrapper .embedpress-license__details .thumb__area {
    margin-bottom: 12px !important;
}

.template__wrapper .embedpress-license__details h2 {
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: var(--ep-text) !important;
    letter-spacing: -0.01em;
}

.template__wrapper .embedpress-license__details .license__content > p,
.template__wrapper .embedpress-license__details .license__content ol li {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--ep-text-2) !important;
}

.template__wrapper .embedpress-license__details .license__content > p {
    margin-bottom: 16px !important;
}

.template__wrapper .embedpress-license__details .license__content ol {
    margin-bottom: 24px !important;
}

.template__wrapper .embedpress-license__details .license__content ol li {
    margin-bottom: 6px !important;
}

.template__wrapper .embedpress-license__details .license__content a {
    color: var(--ep-primary);
    text-underline-offset: 2px;
}

.template__wrapper .embedpress-license__details .form__control {
    min-height: 42px;
    padding-left: 40px !important;
}

.template__wrapper .embedpress-license__details .license__manage {
    background: var(--ep-surface-2) !important;
    border-left: 1px solid var(--ep-border);
}

.template__wrapper .embedpress-license__details .license__manage img {
    max-width: 180px;
}

.template__wrapper .embedpress-license__details .license__manage .button {
    min-height: 40px;
    padding: 0 18px !important;
    border: 1px solid var(--ep-border-strong) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-surface) !important;
    color: var(--ep-text-2) !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 38px !important;
}

.template__wrapper .embedpress-license__details .license__manage .button:hover {
    border-color: var(--ep-primary) !important;
    color: var(--ep-primary) !important;
}

/* ---------- Toasts ---------- */

.template__wrapper .embedpress-toast__message {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    font-size: 14px;
}

/* =========================================================
 * Phase 2: provider settings, Shortcode and Custom Ads
 * ========================================================= */

/* ---------- Provider settings rows (YouTube, Vimeo, Wistia, ...) ---------- */

/* Rows hold a control plus a description, so align to the top. Each control
   type gets a 38px row so the label (padding-top 9px) lines up with it. */
.template__wrapper .embedpress__settings__form .form__group {
    align-items: flex-start;
}

.template__wrapper .embedpress__settings__form .form__group .form__label {
    padding-top: 9px;
    line-height: 20px;
}

.template__wrapper .embedpress__settings__form .form__control__wrap > .input__switch,
.template__wrapper .embedpress__settings__form .form__control__wrap > .input__radio_wrap,
.template__wrapper .embedpress__settings__form .form__control__wrap > .input__flex {
    display: flex;
    align-items: center;
    min-height: 38px;
}

.template__wrapper .embedpress__settings__form .form__control__wrap > .input__switch {
    display: inline-flex;
}

.template__wrapper .embedpress__settings__form .form__control__wrap > p,
.template__wrapper .embedpress__settings__form .form__control__wrap > p + p {
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ep-muted);
}

.template__wrapper .embedpress__settings__form .form__control__wrap > p a {
    color: var(--ep-primary);
    font-weight: 500;
}

.template__wrapper .embedpress__settings__form .form__control__wrap > .form__control,
.template__wrapper .embedpress__settings__form .form__control__wrap > select.form__control {
    width: 100%;
    max-width: 360px;
}

.template__wrapper .embedpress__settings__form select.form__control {
    padding-right: 32px;
    cursor: pointer;
}

/* Radio buttons: a visible ring, a filled dot when checked. */
.template__wrapper .input__radio_wrap {
    gap: 20px;
}

.template__wrapper .input__radio {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding-left: 26px;
    font-size: 14px;
    color: var(--ep-text-2);
}

.template__wrapper .input__radio span:before {
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 1.5px solid var(--ep-border-strong);
    background: var(--ep-surface);
    box-sizing: border-box;
    transition: border-color .15s ease;
}

.template__wrapper .input__radio span:after {
    top: 50%;
    left: 5px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    background: var(--ep-primary);
    transition: opacity .15s ease;
}

.template__wrapper .input__radio:hover span:before,
.template__wrapper .input__radio input:checked ~ span:before {
    border-color: var(--ep-primary);
}

.template__wrapper .input__radio input:checked ~ span {
    color: var(--ep-text);
    font-weight: 500;
}

/* ---------- Shortcode ---------- */

.template__wrapper .embedpress__shortcode .shortcode__text {
    max-width: 720px;
    margin: 20px 0 24px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--ep-text-2) !important;
}

.template__wrapper .embedpress__shortcode .shortcode__text strong {
    color: var(--ep-text);
    font-weight: 600;
}

.template__wrapper .embedpress__shortcode .shortcode__text a {
    color: var(--ep-primary);
    font-weight: 500;
}

.template__wrapper .embedpress__shortcode .shortcode__form {
    max-width: 720px;
    gap: 8px;
    padding: 0;
    margin-bottom: 12px !important;
    background: none;
    border: 0;
    border-radius: 0;
}

.template__wrapper .embedpress__shortcode .shortcode__form .form__group {
    margin: 0;
}

.template__wrapper .embedpress__shortcode .shortcode__form .form__group .form__control {
    width: 100%;
    height: 40px;
    min-height: 40px;
    background: var(--ep-surface);
}

.template__wrapper .embedpress__shortcode .shortcode__form .form__group .form__control[readonly] {
    background: var(--ep-surface-2);
    font-family: Menlo, Consolas, monospace;
    font-size: 13px;
}

.template__wrapper .embedpress__shortcode .shortcode__form .button {
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0 !important;
    padding: 0 18px !important;
    border-radius: var(--ep-radius-sm) !important;
    font-size: 14px !important;
    line-height: 1;
}

/* Generate is the main action; Copy is secondary. */
.template__wrapper .embedpress__shortcode .shortcode__form .button__redColor {
    border: 1px solid var(--ep-primary) !important;
    background: var(--ep-primary) !important;
    color: #fff !important;
}

.template__wrapper .embedpress__shortcode .shortcode__form .button__redColor:hover {
    border-color: var(--ep-primary-hover) !important;
    background: var(--ep-primary-hover) !important;
}

.template__wrapper .embedpress__shortcode .shortcode__form .copy__button {
    border: 1px solid var(--ep-border-strong) !important;
    background: var(--ep-surface) !important;
    color: var(--ep-text-2) !important;
    box-shadow: none;
}

.template__wrapper .embedpress__shortcode .shortcode__form .copy__button:hover {
    border-color: var(--ep-primary) !important;
    background: var(--ep-primary-soft) !important;
    color: var(--ep-primary) !important;
}

/* ---------- Custom Ads ---------- */

.template__wrapper .embedpress_calendly_settings {
    padding: 24px 28px !important;
}

/* Intro box: a plain soft panel instead of the gradient frame. */
.template__wrapper .embedpress_calendly_settings > .border {
    margin-bottom: 20px;
    padding: 0 !important;
    background: none !important;
    border-radius: 10px !important;
}

.template__wrapper .embedpress_calendly_settings .sponsored-settings-top {
    padding: 18px 20px !important;
    background: var(--ep-primary-soft) !important;
    border-radius: 10px;
}

.template__wrapper .embedpress_calendly_settings .ads-settings-title {
    margin-bottom: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4;
    color: var(--ep-text) !important;
}

.template__wrapper .embedpress_calendly_settings .ads-settings-description {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.6;
    text-align: left !important;
    color: var(--ep-text-2) !important;
}

.template__wrapper .embedpress_calendly_settings .ads-settings-description a {
    color: var(--ep-primary);
    font-weight: 500;
}

/* Video / Images switcher: a segmented control. */
.template__wrapper .sponsored-toggle_wrapper {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--ep-bg);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
}

.template__wrapper .sponsored-toggle_btn {
    gap: 8px;
    margin: 0;
    padding: 8px 20px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-muted);
    transition: background .15s ease, color .15s ease;
}

.template__wrapper .sponsored-toggle_btn:hover {
    color: var(--ep-text);
}

.template__wrapper .sponsored-toggle_btn.sponsored-active_btn {
    background: var(--ep-surface);
    color: var(--ep-primary);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.template__wrapper .ad__adjust__controller__item {
    margin-bottom: 20px !important;
}

.template__wrapper .ad__adjust__controller__item .controller__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px !important;
    font-weight: 500;
    color: var(--ep-text) !important;
}

.template__wrapper .ad__adjust__controller__item .uploadBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--ep-border-strong);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
    color: var(--ep-text-2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.template__wrapper .ad__adjust__controller__item .uploadBtn:hover {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
}

.template__wrapper .ad__adjust__controller__item .uploaded {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ep-muted);
}

.template__wrapper .sponsored-preview-sectiion .wp-block-heading {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--ep-text) !important;
}

.template__wrapper .sponsored-preview-sectiion .preview-description {
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--ep-muted) !important;
}

.template__wrapper .sponsored-preview-sectiion button[class*="preview-btn"] {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--ep-primary);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.template__wrapper .sponsored-preview-sectiion button[class*="preview-btn"]:hover {
    border-color: var(--ep-primary-hover);
    background: var(--ep-primary-hover);
}

/* ---------- Account tables (Instagram, Calendly) ---------- */

.template__wrapper .account-wrap:has(> table.emebedpress) {
    overflow: hidden;
    border: 1px solid var(--ep-border);
    border-radius: 10px;
}

.template__wrapper table.emebedpress thead {
    background: var(--ep-surface-2);
}

.template__wrapper table.emebedpress th {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ep-border);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ep-muted);
}

.template__wrapper table.emebedpress td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--ep-border);
    font-size: 13px;
    color: var(--ep-text);
}

.template__wrapper table.emebedpress tbody tr:nth-child(even) {
    background: transparent;
}

.template__wrapper table.emebedpress tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- Calendly ---------- */

/* Event Types / Scheduled Events: the same segmented control as Custom Ads. */
.template__wrapper .calendly-data .tab-container,
.template__wrapper .tab-container:has(> .calendly-Event-button) {
    display: inline-flex;
    gap: 4px;
    padding: 4px !important;
    background: var(--ep-bg) !important;
    border: 1px solid var(--ep-border);
    border-radius: 10px !important;
}

.template__wrapper .tab-container > .calendly-Event-button,
.template__wrapper .tab-container > .calendly-Scheduled-button {
    padding: 7px 16px !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: var(--ep-muted) !important;
    font-size: 14px !important;
    font-weight: 500;
}

.template__wrapper .tab-container > .active-tab {
    background: var(--ep-surface) !important;
    color: var(--ep-primary) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

/* Section header and table header rows: light, not solid blue. */
.template__wrapper .event-type-group-list-item .list-header {
    padding: 10px 14px !important;
    border: 1px solid var(--ep-border);
    border-radius: 10px !important;
    background: var(--ep-surface-2) !important;
    color: var(--ep-text) !important;
    font-size: 13px !important;
    font-weight: 600;
}

.template__wrapper .calendly-data .rwd-table tr:first-child {
    background: var(--ep-surface-2) !important;
    color: var(--ep-muted) !important;
}

.template__wrapper .calendly-data .rwd-table tr:first-child th,
.template__wrapper .calendly-data .rwd-table tr:first-child td {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ep-muted) !important;
}

.template__wrapper .calendly-data .rwd-table tr,
.template__wrapper .calendly-data .rwd-table th,
.template__wrapper .calendly-data .rwd-table td {
    border-color: var(--ep-border) !important;
    border-style: solid !important;
}

.template__wrapper .calendly-data .rwd-table th {
    border-width: 0 0 1px !important;
}

/* ---------- Sidebar: Sources dropdown indicator ---------- */

/* Sources opens a sub-menu (Audio, Video, Image, ...) on its own page, so it
   gets a chevron on the right. It points down while the sub-menu is closed
   and up while it is open (the item has .show on the Sources page). */
.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.sources::after {
    content: '';
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-left: auto;
    background-color: currentColor;
    opacity: .7;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
    transition: transform .2s ease, opacity .15s ease;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item .sidebar__link.sources:hover::after {
    opacity: 1;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item.show .sidebar__link.sources::after {
    opacity: 1;
    transform: rotate(180deg);
}

/* Once admin.js turns Sources into a dropdown ([data-dropdown]), .is-open
   alone decides whether the list shows. Without JS the original rule
   (.show on the Sources page) still applies. */
.template__wrapper .embedpress-sidebar .sidebar__item.sources-item[data-dropdown] .tab-button-section {
    display: none;
}

.template__wrapper .embedpress-sidebar .sidebar__item.sources-item[data-dropdown].is-open .tab-button-section {
    display: block;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item.sources-item[data-dropdown] .sidebar__link.sources::after {
    transform: none;
}

.template__wrapper .embedpress-sidebar .sidebar__menu .sidebar__item.sources-item[data-dropdown].is-open .sidebar__link.sources::after {
    opacity: 1;
    transform: rotate(180deg);
}

.template__wrapper .embedpress-sidebar .sources-item .tab-button {
    cursor: pointer;
}

.template__wrapper .embedpress-sidebar .sources-item .tab-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* ---------- Sources: status filter (All / New / Popular / Updated) ---------- */

.template__wrapper .source-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .source-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template__wrapper .source-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--ep-border-strong);
    border-radius: 999px;
    background: var(--ep-surface);
    color: var(--ep-text-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.template__wrapper .source-filter-chip:hover:not(:disabled) {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
}

.template__wrapper .source-filter-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

.template__wrapper .source-filter-chip.is-active {
    border-color: var(--ep-primary);
    background: var(--ep-primary);
    color: #fff;
}

.template__wrapper .source-filter-chip:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.template__wrapper .source-filter-count {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--ep-bg);
    color: var(--ep-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.template__wrapper .source-filter-chip.is-active .source-filter-count {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.template__wrapper .source-filter-summary {
    margin: -8px 0 16px;
    font-size: 13px;
    color: var(--ep-muted);
}

/* Search by source name, next to the status chips. */
.template__wrapper .source-search {
    position: relative;
    flex: 0 1 260px;
    min-width: 200px;
    margin-left: auto;
}

.template__wrapper .source-search__icon {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--ep-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.template__wrapper .source-search .source-search__input {
    width: 100%;
    height: 38px;
    min-height: 38px;
    margin: 0;
    padding: 0 12px 0 36px;
    border: 1px solid var(--ep-border-strong);
    border-radius: 999px;
    background: var(--ep-surface);
    box-shadow: none;
    color: var(--ep-text);
    font-size: 13px;
    line-height: 1.4;
}

.template__wrapper .source-search .source-search__input::placeholder {
    color: #9aa1b2;
}

.template__wrapper .source-search .source-search__input:focus {
    border-color: var(--ep-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

@media (max-width: 782px) {
    .template__wrapper .source-search {
        flex-basis: 100%;
        margin-left: 0;
    }
}

.template__wrapper .source-filter-empty {
    margin: 0;
    padding: 40px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--ep-muted);
}

/* ---------- Go Premium page ---------- */

/* .ep-premium is an icon class in settings-icons.css, hence .ep-upgrade. The
   extra .embedpress-content level beats the generic card padding rule. */
.template__wrapper .embedpress-content > .background__white.ep-upgrade {
    padding: 0 !important;
    overflow: hidden;
}

/* Hero: a soft brand panel with the badge, pitch and actions. */
.template__wrapper .ep-upgrade__hero {
    position: relative;
    padding: 32px 32px 28px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(91, 78, 150, .14) 0%, rgba(91, 78, 150, 0) 55%),
        linear-gradient(180deg, var(--ep-primary-soft) 0%, var(--ep-surface) 100%);
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-upgrade__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--ep-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.template__wrapper .ep-upgrade__badge svg {
    color: #ffc94d;
}

.template__wrapper .ep-upgrade .ep-upgrade__title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    color: var(--ep-text) !important;
}

.template__wrapper .ep-upgrade__text {
    max-width: 640px;
    margin: 0 0 22px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: var(--ep-text-2) !important;
}

.template__wrapper .ep-upgrade__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.template__wrapper .button.button-pro-upgrade.ep-upgrade__cta {
    min-height: 42px;
    padding: 0 20px !important;
    border: 1px solid var(--ep-primary) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-primary) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(91, 78, 150, .28);
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.template__wrapper .button.button-pro-upgrade.ep-upgrade__cta:hover {
    background: var(--ep-primary-hover) !important;
    border-color: var(--ep-primary-hover) !important;
    box-shadow: 0 6px 18px rgba(91, 78, 150, .34);
    transform: translateY(-1px);
}

.template__wrapper .button.button-pro-upgrade.ep-upgrade__cta:hover svg {
    transform: translateX(2px);
}

.template__wrapper .ep-upgrade__cta svg {
    transition: transform .15s ease;
}

.template__wrapper .ep-upgrade__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-primary) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.template__wrapper .ep-upgrade__link:hover {
    color: var(--ep-primary-hover) !important;
}

/* Feature list: a grid of small tiles with a check mark. */
.template__wrapper .ep-upgrade__features {
    padding: 24px 32px 32px;
}

.template__wrapper .ep-upgrade__features h3 {
    margin: 0 0 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--ep-text) !important;
}

.template__wrapper .upgrage__card__tab__list.ep-upgrade__grid {
    max-width: none;
    margin: 0 !important;
    padding: 0;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    list-style: none;
}

.template__wrapper .upgrage__card__tab__list .upgrage__card__tab__list__item.ep-upgrade__item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    background: var(--ep-surface-2);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ep-text);
    transition: border-color .15s ease, background .15s ease;
}

.template__wrapper .upgrage__card__tab__list .upgrage__card__tab__list__item.ep-upgrade__item:before {
    content: none;
}

.template__wrapper .upgrage__card__tab__list .upgrage__card__tab__list__item.ep-upgrade__item:hover {
    border-color: var(--ep-border-strong);
    background: var(--ep-surface);
}

.template__wrapper .ep-upgrade__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e7f7ee;
    color: #1f9d55;
}

@media (max-width: 767px) {
    .template__wrapper .ep-upgrade__hero,
    .template__wrapper .ep-upgrade__features {
        padding-left: 20px;
        padding-right: 20px;
    }

    .template__wrapper .ep-upgrade .ep-upgrade__title {
        font-size: 20px !important;
    }
}

/* The older premium.php card (page_type=premium) gets the same type and button. */
.template__wrapper .upgrage__card__tab__style:not(.ep-upgrade__features) h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ep-text);
    margin-bottom: 10px;
}

.template__wrapper .upgrage__card__tab__style:not(.ep-upgrade__features) p {
    max-width: 640px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ep-text-2);
}

/* ---------- Sidebar: Premium crown on Custom Ads ---------- */

/* The crown replaces the orange "Premium" text pill. It sits inside the
   Custom Ads link, so the sidebar's hover / active icon rules would recolour
   it; pin the crown's own colours. */
.template__wrapper .embedpress-sidebar .sidebar__menu li.sidebar__item .sidebar__link .embedpress-tag.embedpress-tag--icon {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    padding: 0;
    border-radius: 6px;
    background: #fff4e0;
    flex: 0 0 24px;
}

.template__wrapper .embedpress-sidebar .sidebar__menu li.sidebar__item .sidebar__link .embedpress-tag.embedpress-tag--icon svg {
    width: 14px !important;
    height: 12px !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu li.sidebar__item .sidebar__link .embedpress-tag--icon svg path {
    stroke: none !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu li.sidebar__item .sidebar__link .embedpress-tag--icon svg path:nth-of-type(1) {
    fill: #FF9900 !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu li.sidebar__item .sidebar__link .embedpress-tag--icon svg path:nth-of-type(2) {
    fill: url(#ep-premium-tag-crown) !important;
}

.template__wrapper .embedpress-sidebar .sidebar__menu li.sidebar__item .sidebar__link.active .embedpress-tag.embedpress-tag--icon {
    background: rgba(255, 255, 255, .9);
}

/* ---------- Hub: Premium crown on "Brand Your Work" ---------- */

/* Same crown as the Custom Ads sidebar item, replacing the "Premium" pill
   on the locked branding preview. It keeps the pill's corner position. */
.template__wrapper .embedpress-preview-area .embedpress-tag.embedpress-brand-crown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    top: -12px;
    right: -12px;
    padding: 0;
    border: 1px solid #ffe2ad;
    border-radius: 50%;
    background: #fff4e0;
    box-shadow: 0 2px 6px rgba(255, 153, 0, .25);
    z-index: 1;
}

.template__wrapper .embedpress-preview-area .embedpress-brand-crown svg {
    width: 16px;
    height: 14px;
}

/* =========================================================
 * Custom Ads page: layout pass
 * ========================================================= */

/* Intro: brand colours instead of the inline coral, and the primary CTA.
   The text takes the free width and the button sits on the right (it wraps
   below on narrow screens). ads.php sizes the text to calc(100% - 240px),
   which left an empty strip on the right, so let flex size it instead. */
.template__wrapper .embedpress_calendly_settings .sponsored-settings-top {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}

.template__wrapper .embedpress_calendly_settings .sponsored-settings-top .sponsored-settings-content {
    flex: 1 1 420px;
    width: auto !important;
    min-width: 0;
}

.template__wrapper .embedpress_calendly_settings .sponsored-settings-top > .button {
    flex: 0 0 auto;
}

.template__wrapper .embedpress_calendly_settings .ads-settings-title a,
.template__wrapper .embedpress_calendly_settings .ads-settings-title a span,
.template__wrapper .embedpress_calendly_settings .ads-settings-description a {
    color: var(--ep-primary) !important;
    text-decoration: none;
}

.template__wrapper .embedpress_calendly_settings .ads-settings-description a:hover {
    text-decoration: underline;
}

.template__wrapper .embedpress_calendly_settings .sponsored-settings-top .button.button-pro-upgrade {
    min-height: 40px;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 1px solid var(--ep-primary) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-primary) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(91, 78, 150, .25);
}

.template__wrapper .embedpress_calendly_settings .sponsored-settings-top .button.button-pro-upgrade:hover {
    background: var(--ep-primary-hover) !important;
    border-color: var(--ep-primary-hover) !important;
}

/* Settings and preview side by side, each in its own panel. The old
   bottom border, padding and margin left an empty strip under them. */
.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion {
    display: grid !important;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

@media (max-width: 1199px) {
    .template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion {
        grid-template-columns: minmax(0, 1fr);
    }
}

.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion > .video-ad-prewiew-options,
.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion > div:first-child {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px !important;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    background: var(--ep-surface-2);
}

.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion > .embedpress-gutenberg-wrapper {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px !important;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    background: var(--ep-surface);
}

.template__wrapper .embedpress_calendly_settings .ad__adjust,
.template__wrapper .embedpress_calendly_settings .ad__adjust__wrap,
.template__wrapper .embedpress_calendly_settings .ad__adjust__controller {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Controls */
.template__wrapper .embedpress_calendly_settings .ad__adjust__controller__item {
    margin: 0 0 18px !important;
}

.template__wrapper .embedpress_calendly_settings .ad__adjust__controller__item:last-child {
    margin-bottom: 0 !important;
}

.template__wrapper .embedpress_calendly_settings .ad__adjust__controller__item .controller__label {
    margin: 0 0 8px !important;
    font-size: 13px !important;
    font-weight: 600;
}

.template__wrapper .embedpress_calendly_settings .ad__adjust__controller__item .form__control {
    width: 100%;
    background: var(--ep-surface);
}

/* Upload: the button and the chosen file name on one line. */
.template__wrapper .embedpress_calendly_settings .sponsored-upload-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.template__wrapper .embedpress_calendly_settings .sponsored-upload-options .uploaded {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Number stepper: one rounded field with − / + buttons. */
.template__wrapper .embedpress_calendly_settings .range-control {
    height: 40px;
    overflow: hidden;
    border: 1px solid var(--ep-border-strong);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
}

.template__wrapper .embedpress_calendly_settings .range-control .range_negative,
.template__wrapper .embedpress_calendly_settings .range-control .range_positive {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 40px;
    padding: 0 !important;
    transition: background .15s ease;
}

.template__wrapper .embedpress_calendly_settings .range-control .range_negative {
    border-right: 1px solid var(--ep-border);
}

.template__wrapper .embedpress_calendly_settings .range-control .range_positive {
    border-left: 1px solid var(--ep-border);
}

.template__wrapper .embedpress_calendly_settings .range-control .range_negative:hover,
.template__wrapper .embedpress_calendly_settings .range-control .range_positive:hover {
    background: var(--ep-primary-soft);
}

.template__wrapper .embedpress_calendly_settings .range-control .range_negative:hover .controller,
.template__wrapper .embedpress_calendly_settings .range-control .range_positive:hover .controller {
    background-color: var(--ep-primary);
}

.template__wrapper .embedpress_calendly_settings .range-control .show-value {
    flex: 1;
    align-self: stretch;
}

.template__wrapper .embedpress_calendly_settings .range-control .show-value .form__control {
    height: 100%;
    min-height: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}

.template__wrapper .embedpress_calendly_settings .range-control .show-value .form__control::-webkit-outer-spin-button,
.template__wrapper .embedpress_calendly_settings .range-control .show-value .form__control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.template__wrapper .embedpress_calendly_settings .range-control:focus-within {
    border-color: var(--ep-primary);
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* Skip Button: label and toggle on one row. */
.template__wrapper .embedpress_calendly_settings .skip-controller:not(.skip-after-controller):not(.hidden) {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.template__wrapper .embedpress_calendly_settings .skip-controller:not(.skip-after-controller) .controller__label {
    margin: 0 !important;
}

/* Preview panel */
.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion .wp-block-heading {
    margin: 0 0 6px !important;
    text-align: left !important;
}

.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion .wp-block-heading mark {
    color: inherit !important;
}

.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion .preview-description {
    margin: 0 0 16px !important;
}

.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion .ep-gutenberg-content {
    margin-bottom: 16px !important;
    overflow: hidden;
    border-radius: 10px;
}

/* The preview iframe sat in an inline-block mask, so it shrank to 300px.
   Let it fill the panel at 16:9. */
.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion .sponsored-mask,
.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion .ep-embed-content-wraper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.template__wrapper .embedpress_calendly_settings .sponsored-preview-sectiion iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
}

/* Show every control instead of a 400px inner scroll area. ads.php sets
   that height with an id selector (form#ad-preview-N), so match its ids. */
.template__wrapper .embedpress_calendly_settings form#ad-preview-0 .form-input-wrapper,
.template__wrapper .embedpress_calendly_settings form#ad-preview-1 .form-input-wrapper,
.template__wrapper .embedpress_calendly_settings .ad__adjust__controller .form-input-wrapper {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

.template__wrapper .embedpress_calendly_settings .skip-controller:not(.skip-after-controller) .controller__label {
    flex: 1 1 auto;
    width: auto !important;
    padding: 0 !important;
    text-align: left !important;
    white-space: nowrap;
}

.template__wrapper .embedpress_calendly_settings .skip-controller:not(.skip-after-controller) .ad__adjust__controller__inputs {
    flex: 0 0 auto;
    width: auto !important;
    margin: 0 !important;
}

/* Inputs span the whole row, so the Skip toggle lines up with the fields'
   right edge; the toggle drops the 20px bottom margin settings.css gives it. */
.template__wrapper .embedpress_calendly_settings .ad__adjust__controller__item:not(.skip-controller) .ad__adjust__controller__inputs,
.template__wrapper .embedpress_calendly_settings .skip-after-controller .ad__adjust__controller__inputs {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
}

.template__wrapper .embedpress_calendly_settings .skip-controller .input__switch {
    display: inline-flex;
    margin: 0 !important;
}

/* ads.php pads .entry-content.clear by 0 10px, which set the settings and
   preview panels 10px inside the intro box and the Video / Images switch.
   Drop it so all three share the same edges. */
.template__wrapper .embedpress_calendly_settings .entry-content.clear {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ---------- "Upgrade To Pro" sidebar card (Settings, Shortcode, General) ---------- */

/* Shown beside the form when Pro is not active. It used a gradient frame,
   coral accents and a -70px top margin that pushed it over the card edge;
   restyle it to match the Go Premium page. Markup is unchanged. */
.template__wrapper .shortcode-settings-wrapper {
    gap: 24px;
    align-items: flex-start;
}

.template__wrapper .embedpress-upgrade-pro-sidebar {
    flex: 0 0 280px;
    width: 280px;
    margin: 24px 0 0 !important;
    padding: 0 !important;
    position: sticky;
    top: 48px;
    overflow: hidden;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    background: var(--ep-surface);
    box-shadow: var(--ep-shadow);
}

.template__wrapper .embedpress-upgrade-pro-sidebar .gradient-color {
    padding: 16px !important;
    border-radius: 0 !important;
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(91, 78, 150, .12) 0%, rgba(91, 78, 150, 0) 60%),
        linear-gradient(180deg, var(--ep-primary-soft) 0%, var(--ep-surface) 45%) !important;
}

.template__wrapper .embedpress-upgrade-pro-sidebar img.embedpress-banner {
    display: block;
    width: 100%;
    margin: 0 0 16px !important;
    border-radius: 10px;
    background: var(--ep-surface);
}

.template__wrapper .embedpress-upgrade-pro-sidebar h3,
.template__wrapper .embedpress-upgrade-pro-sidebar h3.cart-title {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--ep-text) !important;
}

.template__wrapper .embedpress-upgrade-pro-sidebar h3 span {
    color: var(--ep-primary) !important;
}

.template__wrapper .embedpress-upgrade-pro-sidebar ul.feature-list {
    display: grid;
    gap: 8px;
    margin: 0 0 18px !important;
    padding: 0;
    list-style: none;
}

.template__wrapper .embedpress-upgrade-pro-sidebar ul.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: var(--ep-text-2) !important;
}

/* The check image becomes a small green circle like the Go Premium tiles. */
.template__wrapper .embedpress-upgrade-pro-sidebar ul.feature-list li img {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    padding: 4px;
    border-radius: 50%;
    background: #e7f7ee;
    box-sizing: border-box;
}

.template__wrapper .embedpress-upgrade-pro-sidebar .pro-upgrade-button {
    min-height: 40px;
    padding: 0 16px !important;
    border: 1px solid var(--ep-primary);
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-primary) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(91, 78, 150, .25);
    text-decoration: none;
    transition: background .15s ease, box-shadow .15s ease;
}

.template__wrapper .embedpress-upgrade-pro-sidebar .pro-upgrade-button:hover {
    background: var(--ep-primary-hover) !important;
    border-color: var(--ep-primary-hover);
    box-shadow: 0 6px 18px rgba(91, 78, 150, .32);
}

.template__wrapper .embedpress-upgrade-pro-sidebar .pro-upgrade-button img {
    width: 14px;
    height: 14px;
}

/* ---------- Branding page (Global Branding Settings) ---------- */

.template__wrapper .embedpress__branding .ep-branding__head {
    padding: 0 0 16px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .embedpress__branding .ep-branding__head h3 {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
}

.template__wrapper .embedpress__branding .ep-branding__intro,
.template__wrapper .embedpress__branding .ep-branding__section p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ep-muted);
}

.template__wrapper .embedpress__branding .ep-branding__section {
    margin: 28px 0 8px;
}

.template__wrapper .embedpress__branding .ep-branding__section h4 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ep-text);
}

/* Each setting is a row card. */
.template__wrapper .embedpress__branding .embedpress__settings__form .form__group {
    margin: 8px 0 0 !important;
    padding: 14px 16px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
    transition: border-color .15s ease, background .15s ease;
}

.template__wrapper .embedpress__branding .embedpress__settings__form .form__group:last-child {
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .embedpress__branding .embedpress__settings__form .form__group:hover {
    border-color: var(--ep-border-strong);
    background: var(--ep-surface-2);
}

.template__wrapper .embedpress__branding .embedpress__settings__form .form__group:has(.input__switch input:checked) {
    border-color: rgba(91, 78, 150, .35);
}

.template__wrapper .embedpress__branding .embedpress__settings__form .form__group:first-of-type {
    margin-top: 20px !important;
}

.template__wrapper .embedpress__branding .form__group .form__label {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* Label and switch share the first line; the opened settings panel
   takes the full width of the row below them. */
.template__wrapper .embedpress__branding .embedpress__settings__form .form__group {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
}

.template__wrapper .embedpress__branding .form__group .form__control__wrap {
    display: contents;
}

.template__wrapper .embedpress__branding .form__group .input__switch {
    flex: none;
    margin-left: auto !important;
}

.template__wrapper .embedpress__branding .form__group .logo__adjust__wrap {
    flex: 0 0 100%;
    max-width: 100%;
}

.template__wrapper .embedpress__branding .input__switch .logo__adjust__toggler {
    position: static;
    display: none;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--ep-radius-sm);
    background: transparent;
    color: var(--ep-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.template__wrapper .embedpress__branding .input__switch input[type="checkbox"]:checked ~ .logo__adjust__toggler {
    display: inline-flex;
}

.template__wrapper .embedpress__branding .input__switch .logo__adjust__toggler i {
    position: static;
    margin-left: 2px;
    font-size: 10px;
    transition: transform .2s ease;
}

.template__wrapper .embedpress__branding .input__switch .logo__adjust__toggler:hover,
.template__wrapper .embedpress__branding .input__switch .logo__adjust__toggler.show {
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
}

.template__wrapper .embedpress__branding .form__group .form__label:after {
    content: none;
}

.template__wrapper .embedpress__branding .form__group .form__label:not(:has(.ep-branding__icon)) {
    max-width: 640px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.template__wrapper .embedpress__branding .ep-branding__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: #fff;
}

.template__wrapper .embedpress__branding .ep-branding__icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.template__wrapper .embedpress__branding .ep-branding__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.template__wrapper .embedpress__branding .ep-branding__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text);
}

.template__wrapper .embedpress__branding .ep-branding__hint {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ep-muted);
}

.template__wrapper .embedpress__branding .ep-branding__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--ep-muted);
}

.template__wrapper .embedpress__branding .ep-branding__status.is-on {
    color: #1f7a4d;
}

.template__wrapper .embedpress__branding .ep-branding__status img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border: 1px solid var(--ep-border);
    border-radius: 4px;
    background: #fff;
}

/* Opened settings panel sits inside the row card. */
.template__wrapper .embedpress__branding .logo__adjust__wrap {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--ep-border);
}

.template__wrapper .embedpress__branding .ep-branding__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ep-border);
}

.template__wrapper .embedpress__branding .ep-branding__footer-note {
    font-size: 13px;
    color: var(--ep-muted);
}

@media (max-width: 767px) {
    .template__wrapper .embedpress__branding .embedpress__settings__form .form__group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .template__wrapper .embedpress__branding .form__group .form__label {
        flex: 1 1 0;
        margin: 0;
        font-weight: 500;
    }

    .template__wrapper .embedpress__branding .ep-branding__footer .embedpress-submit-btn {
        width: 100%;
    }
}

/* ---------- Branding: per-source logo settings panel ---------- */

/* Logo and sliders on the left, live preview on the right. The panel's
   markup is kept as it is for settings.js, so .logo__adjust is flattened
   with display: contents and its children are placed on this grid. */
.template__wrapper .embedpress__branding .logo__adjust__wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    grid-template-areas:
        "heading  preview"
        "logo     preview"
        "controls preview";
    grid-template-rows: auto auto 1fr;
    column-gap: 32px;
    row-gap: 8px;
    align-items: start;
}

.template__wrapper .embedpress__branding .logo__adjust__wrap .logo__adjust {
    display: contents;
}

.template__wrapper .embedpress__branding .ep-logo__heading {
    grid-area: heading;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-2);
}

/* Upload box and uploaded logo */
.template__wrapper .embedpress__branding .logo__adjust__wrap .logo__upload,
.template__wrapper .embedpress__branding .logo__adjust__wrap .logo__upload__preview {
    grid-area: logo;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    box-sizing: border-box;
    border-radius: 10px;
}

.template__wrapper .embedpress__branding .logo__adjust__wrap .logo__upload {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon text"
        "icon hint";
    column-gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px dashed var(--ep-border-strong);
    background: var(--ep-surface-2);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.template__wrapper .embedpress__branding .logo__adjust__wrap .logo__upload:hover {
    border-color: var(--ep-primary);
    background: var(--ep-primary-soft);
}

.template__wrapper .embedpress__branding .logo__upload .icon {
    grid-area: icon;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    color: var(--ep-primary);
}

.template__wrapper .embedpress__branding .logo__upload .icon i {
    font-size: 18px;
    opacity: 1;
}

.template__wrapper .embedpress__branding .logo__upload .text {
    grid-area: text;
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-primary);
}

.template__wrapper .embedpress__branding .logo__upload .hint {
    grid-area: hint;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ep-muted);
}

/* Uploaded logo on a checkerboard so light and transparent logos show. */
.template__wrapper .embedpress__branding .logo__adjust__wrap .logo__upload__preview {
    position: relative;
    padding: 16px;
    border: 1px solid var(--ep-border);
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #eef0f5 25%, transparent 25%),
        linear-gradient(-45deg, #eef0f5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef0f5 75%),
        linear-gradient(-45deg, transparent 75%, #eef0f5 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.template__wrapper .embedpress__branding .logo__upload__preview .instant__preview {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    transform: none;
}

.template__wrapper .embedpress__branding .logo__upload__preview .instant__preview__img {
    display: block;
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.template__wrapper .embedpress__branding .logo__upload__preview .instant__preview .preview__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: auto;
    left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--ep-border);
    border-radius: 50%;
    background: #fff;
    color: var(--ep-muted);
    font-size: 9px;
    line-height: 1;
    box-shadow: var(--ep-shadow);
    transition: color .15s ease, border-color .15s ease;
}

.template__wrapper .embedpress__branding .logo__upload__preview .instant__preview .preview__remove:hover {
    color: #c0392b;
    border-color: #f1c4bf;
}

.template__wrapper .embedpress__branding .logo__upload__preview .preview__remove:focus-visible,
.template__wrapper .embedpress__branding .logo__upload:focus-within {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* Sliders: label and value on one line, slider below. */
.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller {
    grid-area: controls;
    flex: none;
    width: auto;
    margin: 8px 0 0;
}

.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller .logo__adjust__controller__item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    column-gap: 2px;
    row-gap: 6px;
    margin: 0 0 16px;
}

.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller .logo__adjust__controller__item:last-child {
    display: block;
    margin: 0;
}

.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller .logo__adjust__controller__item .controller__label {
    grid-column: 1;
    grid-row: 1;
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-2);
}

.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller .logo__adjust__controller__item .logo__adjust__controller__inputs {
    display: contents;
}

.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller .logo__adjust__controller__item .logo__adjust__controller__inputs input[type="range"] {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: 20px;
    margin: 0;
    background: transparent;
    accent-color: var(--ep-primary);
}

.template__wrapper .embedpress__branding .logo__adjust input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(to right, var(--ep-primary) var(--ep-fill, 0%), #e4e2f0 var(--ep-fill, 0%));
}

.template__wrapper .embedpress__branding .logo__adjust input[type="range"]::-moz-range-track {
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: #e4e2f0;
}

.template__wrapper .embedpress__branding .logo__adjust input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--ep-primary);
}

.template__wrapper .embedpress__branding .logo__adjust input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border: 2px solid var(--ep-primary);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .2);
}

.template__wrapper .embedpress__branding .logo__adjust input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px var(--ep-primary-ring);
}

.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__controller .logo__adjust__controller__item .logo__adjust__controller__inputs .form__control[type="number"] {
    grid-column: 2;
    grid-row: 1;
    width: 3ch;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-text);
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    pointer-events: none;
}

.template__wrapper .embedpress__branding .logo__adjust__controller__inputs .form__control[type="number"]::-webkit-inner-spin-button,
.template__wrapper .embedpress__branding .logo__adjust__controller__inputs .form__control[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.template__wrapper .embedpress__branding .ep-logo__unit {
    grid-column: 3;
    grid-row: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-text);
}

.template__wrapper .embedpress__branding .logo__adjust__controller__item:last-child .controller__label {
    margin-bottom: 6px;
}

.template__wrapper .embedpress__branding .logo__adjust__controller__item:last-child .form__control {
    width: 100%;
    max-width: none;
    min-height: 38px;
    border-radius: var(--ep-radius-sm);
}

.template__wrapper .embedpress__branding .logo__adjust__controller__item:last-child p {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ep-muted);
}

/* Live preview */
.template__wrapper .embedpress__branding .logo__adjust .logo__adjust__preview {
    grid-area: preview;
    flex: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    background: var(--ep-surface-2);
}

.template__wrapper .embedpress__branding .logo__adjust__preview .title {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-2);
}

.template__wrapper .embedpress__branding .ep-logo__preview-hint {
    display: block;
    margin: 2px 0 10px;
    font-size: 12px;
    color: var(--ep-muted);
}

.template__wrapper .embedpress__branding .logo__adjust__preview .preview__box {
    position: relative;
    min-height: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--ep-radius-sm);
    background: #11131d;
}

.template__wrapper .embedpress__branding .logo__adjust__preview .preview__box > div,
.template__wrapper .embedpress__branding .logo__adjust__preview .preview__box iframe {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0;
    max-height: none !important;
    border: 0;
}

.template__wrapper .embedpress__branding .logo__adjust__preview .preview__box .preview__logo {
    z-index: 2;
    max-height: 40px;
    pointer-events: none;
}

.template__wrapper .embedpress__branding .logo__adjust__preview .preview__box .preview__logo[src=""] {
    display: none;
}

@media (max-width: 1100px) {
    .template__wrapper .embedpress__branding .logo__adjust__wrap {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "heading"
            "logo"
            "controls"
            "preview";
        grid-template-rows: none;
    }

    .template__wrapper .embedpress__branding .logo__adjust .logo__adjust__preview {
        margin-top: 8px;
    }
}

/* ---------- Custom Ads: header, form heading, units, preview ---------- */

.template__wrapper .ep-ads .ads-settings-title {
    margin: 0 0 6px !important;
    font-size: var(--ep-fs-page) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--ep-text) !important;
}

.template__wrapper .ep-ads .ads-settings-description {
    max-width: 760px;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--ep-text-2) !important;
}

.template__wrapper .ep-ads .ep-ads__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: 10px;
}

.template__wrapper .ep-ads .ep-ads__pro-note {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ep-surface);
    color: var(--ep-primary);
    font-size: 12px;
    font-weight: 500;
}

.template__wrapper .ep-ads .ep-ads__docs {
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-primary) !important;
    text-decoration: none;
}

.template__wrapper .ep-ads .ep-ads__docs:hover {
    text-decoration: underline;
}

.template__wrapper .ep-ads .sponsored-toggle_btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* Settings column heading */
.template__wrapper .ep-ads .ep-ads__form-head {
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-ads .ep-ads__form-head h4 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ep-text);
}

.template__wrapper .ep-ads .ep-ads__form-head p {
    margin: 0;
    font-size: 12px;
    color: var(--ep-muted);
}

/* Current ad file as a chip, the button replaces it. */
.template__wrapper .ep-ads .sponsored-upload-options {
    flex-wrap: nowrap;
}

.template__wrapper .ep-ads .sponsored-upload-options .uploaded {
    order: -1;
    position: relative;
    flex: 1 1 auto;
    display: block;
    height: 40px;
    padding: 0 12px 0 36px;
    line-height: 38px;
    box-sizing: border-box;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
    color: var(--ep-text);
    font-size: 13px !important;
}

.template__wrapper .ep-ads .sponsored-upload-options .uploaded::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    background: var(--ep-primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.template__wrapper .ep-ads .sponsored-upload-options .uploadBtn {
    flex: none;
}

/* Steppers: narrower, with a "sec" unit next to the number. */
.template__wrapper .ep-ads .range-control {
    max-width: 200px;
}

.template__wrapper .ep-ads .range-control .show-value {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.template__wrapper .ep-ads .range-control .show-value input {
    width: 4ch !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.template__wrapper .ep-ads .ep-ads__unit {
    font-size: 13px;
    color: var(--ep-muted);
}

/* Skip button: label and switch on one line. */
.template__wrapper .ep-ads .skip-controller:not(.skip-after-controller) {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

.template__wrapper .ep-ads .skip-controller:not(.skip-after-controller).hidden {
    display: none !important;
}

.template__wrapper .ep-ads .skip-controller:not(.skip-after-controller) .controller__label {
    margin: 0 !important;
}

/* Preview panel */
.template__wrapper .ep-ads .sponsored-preview-sectiion .wp-block-heading {
    margin: 0 0 4px !important;
    font-size: 15px !important;
    text-align: left !important;
}

.template__wrapper .ep-ads .sponsored-preview-sectiion .preview-description {
    margin: 0 0 14px !important;
    font-size: 12px !important;
}

.template__wrapper .ep-ads .sponsored-preview-sectiion .ep-gutenberg-content {
    overflow: hidden;
    border-radius: var(--ep-radius-sm);
}

.template__wrapper .ep-ads .sponsored-preview-sectiion button[class*="preview-btn"] {
    margin-top: 14px;
}

@media (max-width: 600px) {
    .template__wrapper .ep-ads .sponsored-upload-options {
        flex-wrap: wrap;
    }

    .template__wrapper .ep-ads .range-control {
        max-width: none;
    }
}

/* The shared Calendly wrapper draws an icon glyph before the card. On the
   Custom Ads page the icon font is not loaded, so it showed as a box. */
.template__wrapper .ep-ads::before {
    content: none !important;
}

@media (max-width: 600px) {
    .template__wrapper .ep-ads .sponsored-toggle_wrapper {
        display: flex !important;
        flex-direction: row !important;
        width: 100%;
    }

    .template__wrapper .ep-ads .sponsored-toggle_btn {
        flex: 1 1 auto;
        justify-content: center;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .template__wrapper .ep-ads .sponsored-toggle_btn > span {
        flex: none;
    }
}

/* ---------- License card ---------- */

.template__wrapper .ep-license {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 0;
}

.template__wrapper .ep-license .license__content {
    padding: 28px 32px !important;
}

/* Status pill above the heading */
.template__wrapper .ep-license .ep-license__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.template__wrapper .ep-license .ep-license__status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.template__wrapper .ep-license.is-inactive .ep-license__status {
    background: #fff4e5;
    color: #b25e09;
}

.template__wrapper .ep-license.is-active .ep-license__status {
    background: #e7f7ee;
    color: #1f7a4d;
}

.template__wrapper .ep-license .thumb__area {
    margin: 0 0 6px !important;
}

.template__wrapper .ep-license .thumb__area h2 {
    margin: 0 !important;
    font-size: 22px !important;
}

.template__wrapper .ep-license .license__content > p {
    margin: 0 0 20px !important;
}

/* Steps as numbered circles */
.template__wrapper .ep-license .license__content ol {
    counter-reset: ep-step;
    margin: 0 0 24px !important;
    padding: 16px 18px !important;
    list-style: none;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface-2);
}

.template__wrapper .ep-license .license__content ol li {
    position: relative;
    counter-increment: ep-step;
    margin: 0 0 10px !important;
    padding-left: 34px;
    list-style: none;
}

.template__wrapper .ep-license .license__content ol li:last-child {
    margin-bottom: 0 !important;
}

.template__wrapper .ep-license .license__content ol li::before {
    content: counter(ep-step);
    position: absolute;
    top: 1px;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
    font-size: 12px;
    font-weight: 600;
}

/* Key field and button on one row, label above. */
.template__wrapper .ep-license .form__inline .form-inner-field {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.template__wrapper .ep-license .ep-license__label {
    flex: 0 0 100%;
    margin: 0 !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-2);
}

.template__wrapper .ep-license .form__inline .form__group {
    position: relative;
    flex: 1 1 260px;
    margin: 0 !important;
}

.template__wrapper .ep-license .form__group .input__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--ep-muted);
}

.template__wrapper .ep-license .form__group img.input__icon {
    width: 18px;
    height: 18px;
}

.template__wrapper .ep-license .form__control {
    width: 100%;
    height: 44px !important;
    min-height: 44px;
    border: 1px solid var(--ep-border-strong) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-surface) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px !important;
    letter-spacing: .02em;
}

.template__wrapper .ep-license .form__control:placeholder-shown {
    font-family: inherit;
    letter-spacing: 0;
}

.template__wrapper .ep-license .form__control::placeholder {
    color: #9aa1b2;
}

.template__wrapper .ep-license .form__control:focus {
    border-color: var(--ep-primary) !important;
    box-shadow: 0 0 0 3px var(--ep-primary-ring) !important;
    outline: none;
}

.template__wrapper .ep-license .form__control:disabled {
    background: var(--ep-surface-2) !important;
    color: var(--ep-text-2);
}

.template__wrapper .ep-license .form-inner-field button {
    height: 44px;
    min-height: 44px;
    flex: none;
}

.template__wrapper .ep-license .embedpress-license-deactivation-btn,
.template__wrapper .ep-license .embedpress-verification-deactivation-btn {
    padding: 0 18px !important;
    border: 1px solid #f1c4bf !important;
    border-radius: var(--ep-radius-sm) !important;
    background: #fff !important;
    color: #c0392b !important;
    font-size: 14px !important;
    font-weight: 500;
}

.template__wrapper .ep-license .embedpress-license-deactivation-btn:hover,
.template__wrapper .ep-license .embedpress-verification-deactivation-btn:hover {
    background: #fdf0ee !important;
}

.template__wrapper .ep-license #valid-license-key-message,
.template__wrapper .ep-license #resend-verification-key-message,
.template__wrapper .ep-license #invalid-verification-key-message {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ep-text-2);
}

.template__wrapper .ep-license #invalid-verification-key-message {
    color: #c0392b;
}

.template__wrapper .ep-license #otp-varify-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ep-border);
}

/* Active state: what the license gives, as two compact tiles. */
.template__wrapper .ep-license .validated-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 24px !important;
    padding: 0 !important;
}

.template__wrapper .ep-license .validated-feature-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface-2);
}

.template__wrapper .ep-license .validated-feature-list-icon img {
    width: 32px;
    height: 32px;
}

.template__wrapper .ep-license .validated-feature-list-content h4 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ep-text);
}

.template__wrapper .ep-license .validated-feature-list-content p {
    margin: 0 !important;
    font-size: 13px !important;
    color: var(--ep-muted) !important;
}

/* Side panel: what Pro includes, and where to manage or buy a license. */
.template__wrapper .ep-license .license__manage {
    align-items: flex-start !important;
    justify-content: center;
    gap: 0;
    padding: 28px !important;
    text-align: left;
}

.template__wrapper .ep-license .license__manage .ep-license__logo {
    max-width: 140px !important;
    margin-bottom: 20px;
}

.template__wrapper .ep-license .license__manage h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ep-text);
}

.template__wrapper .ep-license .ep-license__perks {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.template__wrapper .ep-license .ep-license__perks li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 24px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ep-text-2);
}

.template__wrapper .ep-license .ep-license__perks li::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ep-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235b4e96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.5l2.2 2.2 4.8-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.template__wrapper .ep-license .license__manage .button {
    margin: 0 !important;
}

.template__wrapper .ep-license .ep-license__buy {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-primary) !important;
    text-decoration: none;
}

.template__wrapper .ep-license .ep-license__buy:hover {
    text-decoration: underline;
}

@media (max-width: 991px) {
    .template__wrapper .ep-license .license__manage {
        border-left: 0;
        border-top: 1px solid var(--ep-border);
    }
}

@media (max-width: 600px) {
    .template__wrapper .ep-license .license__content {
        padding: 20px !important;
    }

    .template__wrapper .ep-license .form-inner-field button {
        width: 100%;
    }

    .template__wrapper .ep-license .validated-feature-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Settings page ---------- */

.template__wrapper .ep-settings-page .ep-settings__head {
    padding: 0 0 16px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-settings-page .ep-settings__head h3 {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
}

.template__wrapper .ep-settings-page .ep-settings__head p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ep-muted);
}

.template__wrapper .ep-settings-page .ep-settings__section {
    margin: 24px 0 0;
}

.template__wrapper .ep-settings-page .ep-settings__section:first-child {
    margin-top: 20px;
}

.template__wrapper .ep-settings-page .ep-settings__section h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ep-muted);
}

/* Each setting is a row card: name and hint on the left, control on the right. */
.template__wrapper .ep-settings-page .embedpress__settings__form .form__group {
    flex-wrap: wrap;
    align-items: center;
    gap: 0 24px;
    margin: 8px 0 0 !important;
    padding: 14px 16px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
    transition: border-color .15s ease, background .15s ease;
}

.template__wrapper .ep-settings-page .embedpress__settings__form .form__group:last-child {
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-settings-page .embedpress__settings__form .form__group:hover {
    border-color: var(--ep-border-strong);
    background: var(--ep-surface-2);
}

.template__wrapper .ep-settings-page .form__group .form__label {
    display: flex;
    padding-top: 0;
    flex: 1 1 0;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: 620px;
}

.template__wrapper .ep-settings-page .form__group .form__label:after {
    content: none;
}

.template__wrapper .ep-settings-page .ep-settings__name {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text);
}

.template__wrapper .ep-settings-page .ep-settings__hint {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ep-muted);
}

/* Control column: flattened so the opened colour panel can take a full row. */
.template__wrapper .ep-settings-page .form__group > .form__control__wrap {
    display: contents;
}

.template__wrapper .ep-settings-page .form__group .input__switch,
.template__wrapper .ep-settings-page .form__group .input__flex {
    flex: none;
    margin-left: auto !important;
}

/* Number with the unit inside the field. */
.template__wrapper .ep-settings-page .form__group .input__flex {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 120px;
    gap: 0 !important;
}

.template__wrapper .ep-settings-page .form__group input[type="number"].form__control {
    width: 120px !important;
    max-width: none !important;
    flex: none;
    height: 40px;
    padding: 0 36px 0 12px !important;
    border: 1px solid var(--ep-border-strong);
    border-radius: var(--ep-radius-sm);
    font-variant-numeric: tabular-nums;
}

.template__wrapper .ep-settings-page .form__group input[type="number"].form__control:focus {
    border-color: var(--ep-primary);
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
    outline: none;
}

.template__wrapper .ep-settings-page .form__group .frame__unit {
    position: absolute;
    right: 12px;
    margin: 0 !important;
    font-size: 13px;
    color: var(--ep-muted);
    pointer-events: none;
}

/* "Settings" toggle for the PDF colour, like the Branding page. */
.template__wrapper .ep-settings-page .input__switch .logo__adjust__toggler {
    position: static;
    display: none;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--ep-radius-sm);
    background: transparent;
    color: var(--ep-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.template__wrapper .ep-settings-page .input__switch input[type="checkbox"]:checked ~ .logo__adjust__toggler {
    display: inline-flex;
}

.template__wrapper .ep-settings-page .input__switch .logo__adjust__toggler i {
    position: static;
    margin-left: 2px;
    font-size: 10px;
    transition: transform .2s ease;
}

.template__wrapper .ep-settings-page .input__switch .logo__adjust__toggler:hover,
.template__wrapper .ep-settings-page .input__switch .logo__adjust__toggler.show {
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
}

.template__wrapper .ep-settings-page .form__group .logo__adjust__wrap {
    flex: 0 0 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--ep-border);
}

.template__wrapper .ep-settings-page .logo__adjust__wrap .form__control__wrap,
.template__wrapper .ep-settings-page .logo__adjust__wrap .input__flex {
    display: flex;
    margin: 0 !important;
}

.template__wrapper .ep-settings-page .ep-settings__color {
    align-items: center;
    gap: 12px;
}

.template__wrapper .ep-settings-page .ep-settings__color label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-2);
}

.template__wrapper .ep-settings-page .ep-settings__color input[type="color"] {
    width: 44px;
    height: 32px;
    padding: 2px;
    border: 1px solid var(--ep-border-strong);
    border-radius: var(--ep-radius-sm);
    background: #fff;
    cursor: pointer;
}

.template__wrapper .ep-settings-page .ep-settings__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ep-border);
    font-size: 13px;
    color: var(--ep-muted);
}

@media (max-width: 767px) {
    .template__wrapper .ep-settings-page .embedpress__settings__form .form__group {
        flex-direction: row;
        align-items: center;
    }

    .template__wrapper .ep-settings-page .form__group .form__label {
        margin: 0;
        font-weight: 400;
    }

    .template__wrapper .ep-settings-page .form__group input[type="number"].form__control {
        width: 100px;
    }

    .template__wrapper .ep-settings-page .ep-settings__footer .embedpress-submit-btn {
        width: 100%;
    }
}

/* ---------- Shortcode page ---------- */

.template__wrapper .ep-shortcode-page .ep-shortcode__head {
    padding: 0 0 16px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__head h3 {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__head p {
    max-width: 760px;
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ep-muted);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__head a {
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__head a:hover {
    text-decoration: underline;
}

.template__wrapper .ep-shortcode-page .embedpress__shortcode {
    padding-top: 20px;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__step {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    background: var(--ep-surface);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text);
}

.template__wrapper .ep-shortcode-page .shortcode__form {
    margin: 0 !important;
}

.template__wrapper .ep-shortcode-page .shortcode__form .button {
    min-width: 150px;
}

/* After "Generate" the link field holds the shortcode; it reads as code. */
.template__wrapper .ep-shortcode-page #ep-link.is-shortcode {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px !important;
    color: var(--ep-text);
    background: var(--ep-surface-2) !important;
}

.template__wrapper .ep-shortcode-page #ep-shortcode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* "Click to copy" state: a copy icon before the label. */
.template__wrapper .ep-shortcode-page #ep-shortcode-btn.is-copy::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.template__wrapper .ep-shortcode-page #ep-shortcode-btn.is-copied {
    border-color: #1f7a4d !important;
    background: #1f7a4d !important;
    color: #fff !important;
}

.template__wrapper .ep-shortcode-page #ep-shortcode-btn.is-copied::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.template__wrapper .ep-shortcode-page .ep-shortcode__hint {
    min-height: 18px;
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--ep-muted);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__hint:empty {
    display: none;
}

/* Attribute reference: one collapsible block per shortcode. */
.template__wrapper .ep-shortcode-page .ep-shortcode__attrs {
    margin-top: 24px;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__attrs h4 {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ep-muted);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__attrs-intro {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ep-text-2);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref {
    margin: 0 0 8px;
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    background: var(--ep-surface);
    overflow: hidden;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    color: var(--ep-text-2);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref summary::-webkit-details-marker {
    display: none;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .15s ease;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref[open] summary::after {
    transform: rotate(-135deg);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref summary:hover {
    background: var(--ep-surface-2);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref summary:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--ep-primary-ring);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref summary code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: 12px;
    font-weight: 600;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid var(--ep-border);
    font-size: 13px;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table th,
.template__wrapper .ep-shortcode-page .ep-shortcode__table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--ep-border);
    text-align: left;
    vertical-align: top;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table th {
    background: var(--ep-surface-2);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ep-muted);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table td {
    color: var(--ep-text-2);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table td:first-child {
    width: 34%;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table td:nth-child(2) {
    width: 18%;
    white-space: nowrap;
    color: var(--ep-muted);
}

.template__wrapper .ep-shortcode-page .ep-shortcode__table code,
.template__wrapper .ep-shortcode-page .ep-shortcode__ref-example code {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--ep-surface-2);
    color: var(--ep-text);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__pro {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #595092;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    vertical-align: middle;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref-example {
    padding: 12px 14px;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__ref-example code {
    display: block;
    padding: 8px 10px;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__attrs-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .ep-shortcode-page .ep-shortcode__attrs-more::after {
    content: " \2192";
}

.template__wrapper .ep-shortcode-page .ep-shortcode__attrs-more:hover {
    color: var(--ep-primary-hover);
}

@media (max-width: 600px) {
    .template__wrapper .ep-shortcode-page .ep-shortcode__table thead {
        display: none;
    }

    .template__wrapper .ep-shortcode-page .ep-shortcode__table tr {
        display: block;
        padding: 8px 14px;
        border-bottom: 1px solid var(--ep-border);
    }

    .template__wrapper .ep-shortcode-page .ep-shortcode__table td {
        display: block;
        width: auto !important;
        padding: 2px 0;
        border: 0;
        white-space: normal !important;
    }
}

@media (max-width: 600px) {
    .template__wrapper .ep-shortcode-page .shortcode__form {
        flex-wrap: wrap;
    }

    .template__wrapper .ep-shortcode-page .shortcode__form .form__group,
    .template__wrapper .ep-shortcode-page .shortcode__form .button {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* ---------- Hub: brand preview, popular sources ---------- */

/* Brand preview: say there is no logo yet instead of an empty box. */
.template__wrapper .embedpress-branding-preview-wrapper .embedpress-preview-area:not(:has(img)) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.template__wrapper .embedpress-branding-preview-wrapper .embedpress-preview-area:not(:has(img))::before {
    content: "No logo yet";
    font-size: 12px;
    color: var(--ep-muted);
}

.template__wrapper .embedpress-branding-preview-wrapper .embedpress-upload-btn {
    min-height: 30px;
    padding: 0 12px !important;
    border: 1px solid var(--ep-border-strong) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-surface) !important;
    color: var(--ep-text-2) !important;
    font-size: 13px !important;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
}

.template__wrapper .embedpress-branding-preview-wrapper .embedpress-upload-btn:not([disabled]):hover {
    border-color: var(--ep-primary) !important;
    color: var(--ep-primary) !important;
}

.template__wrapper .embedpress-branding-preview-wrapper .embedpress-upload-btn.remove-btn:not([disabled]):hover {
    border-color: #f1c4bf !important;
    color: #c0392b !important;
}

/* Popular sources: each category in its own column card. */
.template__wrapper .embedpress-popular-content-body {
    padding: 16px !important;
    background: none !important;
    border: 0 !important;
}

.template__wrapper .embedpress-popular-content-body > .embedpress-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 !important;
}

.template__wrapper .embedpress-popular-content-body .embdpress-col-3 {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
}

.template__wrapper .embedpress-popular-content-cards {
    height: 100%;
    padding: 14px !important;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    background: var(--ep-surface-2);
    box-sizing: border-box;
}

.template__wrapper .embedpress-popular-content-cards .embedpress-card-header-wrapper {
    margin-bottom: 12px !important;
}

.template__wrapper .embedpress-popular-content-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 !important;
}

.template__wrapper .embedpress-popular-content-list-item {
    margin: 0 !important;
    background: var(--ep-surface) !important;
}

.template__wrapper .embedpress-hub-item-actions {
    display: flex;
    gap: 2px;
}

.template__wrapper .embedpress-hub-item-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    transition: background .15s ease;
}

.template__wrapper .embedpress-hub-item-link:hover {
    background: var(--ep-primary-soft);
}

.template__wrapper .embedpress-hub-item-link:hover svg g {
    stroke: var(--ep-primary);
}

.template__wrapper .embedpress-hub-item-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}



@media (max-width: 600px) {
    .template__wrapper .embedpress-popular-content-body {
        padding: 0 !important;
    }

    .template__wrapper .embedpress-popular-content-body > .embedpress-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .template__wrapper .embedpress-popular-content-cards {
        height: auto;
        min-height: 0 !important;
    }
}

/* Custom Ads > Ad settings: every field spans the card. settings.css gives
   the inputs a 95% width, so the fields stopped 15px short of the card
   edge while the Skip toggle sat on the edge, and the Replace button kept a
   10px bottom margin, which pushed it 4px above the file chip. */
.template__wrapper .ep-ads .ad__adjust__controller__item:not(.skip-controller) .ad__adjust__controller__inputs,
.template__wrapper .ep-ads .skip-after-controller .ad__adjust__controller__inputs {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
}

.template__wrapper .ep-ads .sponsored-upload-options {
    align-items: stretch;
    gap: 8px;
}

.template__wrapper .ep-ads .sponsored-upload-options .uploadBtn {
    height: 40px;
    min-height: 40px;
    margin: 0 !important;
}

.template__wrapper .ep-ads .ad__adjust__controller__item .controller__label.negative-margin {
    margin-top: 0 !important;
}

.template__wrapper .ep-ads .range-control {
    width: 100%;
    max-width: none;
}

/* settings.css pads each row 15px on the right, so the fields stopped short
   of the "Ad settings" heading divider above them. */
.template__wrapper .ep-ads .ad__adjust__controller__item {
    padding-right: 0 !important;
}

/* At wide screens settings.css switches each row to "label left, field
   right", which squeezed the label to one word per line and pushed the
   Replace button out of the card (seen at 1920px). Keep the label above the
   field at every width; only the Skip toggle stays on the label's line. */
.template__wrapper .ep-ads .ad__adjust__controller__item:not(.skip-controller),
.template__wrapper .ep-ads .ad__adjust__controller__item.skip-after-controller {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0;
}

.template__wrapper .ep-ads .ad__adjust__controller__item:not(.skip-controller) .controller__label,
.template__wrapper .ep-ads .ad__adjust__controller__item.skip-after-controller .controller__label {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    margin: 0 0 8px !important;
}

.template__wrapper .ep-ads .ad__adjust__controller__item.skip-controller:not(.skip-after-controller) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.template__wrapper .ep-ads .sponsored-upload-options .uploaded {
    min-width: 0;
}

/* ==========================================================================
   Typography system
   One type scale for every dashboard page. Loads last so it settles the
   sizes, weights and line heights that older rules set one by one.

   Page title     20px / 600 / 1.3
   Card title     16px / 600 / 1.4
   Sub-heading    14px / 600 / 1.4
   Label, nav     14px / 500 / 1.45
   Body           13px / 400 / 1.6
   Small          12px / 500 / 1.5
   Overline       12px / 600 / 1.3, uppercase
   Badge          11px / 600 / 16px line
   Button         14px / 600 / 1.2  (secondary 13px / 500)
   ========================================================================== */

.template__wrapper {
    --ep-fs-page: 20px;
    --ep-fs-card: 16px;
    --ep-fs-sub: 14px;
    --ep-fs-label: 14px;
    --ep-fs-body: 13px;
    --ep-fs-small: 12px;
    --ep-fs-badge: 11px;
    text-rendering: optimizeLegibility;
}

.template__wrapper h1,
.template__wrapper h2,
.template__wrapper h3,
.template__wrapper h4,
.template__wrapper h5 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: var(--ep-text);
}

/* Header */
.template__wrapper .embedpress-header p {
    font-size: var(--ep-fs-body) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--ep-muted) !important;
}

/* Page titles: the first heading of each page. */
.template__wrapper .ep-settings__head h3,
.template__wrapper .ep-shortcode__head h3,
.template__wrapper .ep-branding__head h3,
.template__wrapper h3.ads-settings-title {
    font-size: var(--ep-fs-page) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
}

/* Page intros under the title. */
.template__wrapper .ep-settings__head p,
.template__wrapper .ep-shortcode__head p,
.template__wrapper .ep-branding__head p,
.template__wrapper p.ads-settings-description,
.template__wrapper p.ep-upgrade__text {
    font-size: var(--ep-fs-label) !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    color: var(--ep-text-2) !important;
}

/* Card titles */
.template__wrapper h2.embedpress-banner-header,
.template__wrapper h2.embedpress-popular-types-header,
.template__wrapper h2.embedpress-pop-up-header,
.template__wrapper h2.embedPress-left-panel-header,
.template__wrapper h2.embedPress-right-panel-header,
.template__wrapper .embedpress--elements__wrap > h3,
.template__wrapper .embedpress-card h3 {
    font-size: var(--ep-fs-card) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.005em !important;
}

/* The two intro cards lead the page, so they sit one step up. */
.template__wrapper h2.embedPress-left-panel-header,
.template__wrapper h2.embedPress-right-panel-header {
    font-size: 18px !important;
    line-height: 1.35 !important;
}

/* Sub-headings inside a card */
.template__wrapper h3.embedpress-follow-steps-header,
.template__wrapper h3.embedpress-content-card-header,
.template__wrapper h3.embedpress-banner-secondary-header,
.template__wrapper .ep-branding__section h4,
.template__wrapper .ep-ads__form-head h4,
.template__wrapper .ep-upgrade__features > h3 {
    font-size: var(--ep-fs-sub) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
}

/* Overlines: small uppercase group labels. */
.template__wrapper .ep-settings-page h4,
.template__wrapper .ep-shortcode__attrs h4 {
    font-size: var(--ep-fs-small) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    color: var(--ep-muted) !important;
}

/* Body copy in cards */
.template__wrapper p.embedpress-banner-sub-header,
.template__wrapper li.embedpress-follow-steps-list-item,
.template__wrapper .embedpress-card p,
.template__wrapper .ep-branding__section p,
.template__wrapper .ep-ads__form-head p,
.template__wrapper .ep-shortcode__attrs-intro,
.template__wrapper .ep-shortcode__table td {
    font-size: var(--ep-fs-body) !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

/* Feature lists */
.template__wrapper li.embedpress-premium-features-list-item,
.template__wrapper .ep-plan-card__features li,
.template__wrapper li.ep-upgrade__item {
    font-size: var(--ep-fs-body) !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
}

/* Setting names and form labels */
.template__wrapper .ep-settings__name,
.template__wrapper .ep-branding__name,
.template__wrapper .ep-shortcode__label,
.template__wrapper .ad__adjust .controller__label {
    font-size: var(--ep-fs-label) !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    color: var(--ep-text) !important;
}

/* Hints under a setting */
.template__wrapper .ep-settings__hint,
.template__wrapper .ep-branding__hint,
.template__wrapper .ep-settings__footer span,
.template__wrapper .ep-branding__footer-note,
.template__wrapper .ep-shortcode__hint,
.template__wrapper p.preview-description {
    font-size: var(--ep-fs-small) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--ep-muted) !important;
}

/* Inline links read at the size of their text, at one weight. */
.template__wrapper a.ep-link,
.template__wrapper a.ep-ads__docs,
.template__wrapper a.ep-plan-card__link,
.template__wrapper a.ep-shortcode__attrs-more,
.template__wrapper .embedpress-popular-content-header a,
.template__wrapper .embedpress-card p a {
    font-weight: 500 !important;
}

.template__wrapper a.ep-plan-card__link,
.template__wrapper a.ep-shortcode__attrs-more,
.template__wrapper .embedpress-popular-content-header a {
    font-size: var(--ep-fs-body) !important;
    line-height: 1.5 !important;
}

/* Popular content type names */
.template__wrapper .embedpress-popular-content-wrapper span.embedpress-font-m {
    font-size: var(--ep-fs-body) !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Elements page */
.template__wrapper .element__item h5 {
    font-size: var(--ep-fs-label) !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

.template__wrapper .element__tooltip {
    font-size: var(--ep-fs-small) !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
}

/* Sources page */
.template__wrapper .source-name {
    font-size: var(--ep-fs-body) !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
}

.template__wrapper li.tab-button {
    font-size: var(--ep-fs-body) !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Ads page: units and file name sat on a 0 or 3x line height. */
.template__wrapper .ep-ads__unit,
.template__wrapper .ad__adjust span,
.template__wrapper .ad__adjust .uploadBtn {
    line-height: 1.4 !important;
}

/* The file name sits in a 40px box; a 38px line centres it. */
.template__wrapper p.uploaded-file-url-0 {
    font-size: var(--ep-fs-body) !important;
    line-height: 38px !important;
}

/* "Live preview" is an h2 in the markup; it reads as a sub-heading. */
.template__wrapper h2.wp-block-heading,
.template__wrapper h2.wp-block-heading mark {
    font-size: var(--ep-fs-sub) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

/* Badges */
.template__wrapper span.isPro,
.template__wrapper .ep-shortcode__pro,
.template__wrapper .ep-upgrade__badge,
.template__wrapper .ep-plan-card__badge,
.template__wrapper .ribbon-container,
.template__wrapper .ep-coming-soon {
    font-size: var(--ep-fs-badge) !important;
    font-weight: 600 !important;
    line-height: 16px !important;
    letter-spacing: 0.04em !important;
}

.template__wrapper .ep-shortcode__table th {
    font-size: var(--ep-fs-badge) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

/* Buttons: primary 14px / 600, secondary 13px / 500. */
.template__wrapper .embedpress-submit-btn,
.template__wrapper #ep-shortcode-btn,
.template__wrapper a.button-pro-upgrade,
.template__wrapper a.embdpress-compare-btn,
.template__wrapper a.ep-plan-card__cta,
.template__wrapper .ad__adjust button[class*="preview-btn"],
.template__wrapper .embedpress-header .upgrade-link {
    font-size: var(--ep-fs-label) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.template__wrapper .embedpress-card a.button,
.template__wrapper a.logo__adjust__toggler {
    font-size: var(--ep-fs-body) !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
}

.template__wrapper a.ep-plan-card__cta span,
.template__wrapper #ep-shortcode-btn span {
    font: inherit !important;
}

/* Upgrade sidebar card title */
.template__wrapper .embedpress-upgrade-pro-sidebar h3.cart-title,
.template__wrapper .embedpress-upgrade-pro-sidebar h3.cart-title span {
    font-size: var(--ep-fs-card) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

/* Inline upsell link inside card copy */
.template__wrapper a.embdpress-hilight-text {
    font-weight: 600 !important;
}

/* Floating quick links */
.template__wrapper .sponsored-link_name {
    font-size: var(--ep-fs-label) !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* ==========================================================================
   Feature lists: one line per item
   Each item stays on one line. The grid fits two columns when there is room
   and falls back to one column instead of breaking a label in two.
   ========================================================================== */

.template__wrapper .embedpress-hub-section .ep-plan-card__features {
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 8px 12px;
    padding: 12px;
}

.template__wrapper .embedpress-hub-section .ep-plan-card__features li,
.template__wrapper .embedpress-premium-features-list .embedpress-premium-features-list-item {
    white-space: nowrap;
}

.template__wrapper .embedpress-premium-features-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
}

.template__wrapper .embedpress-premium-features-list .embedpress-premium-features-list-item,
.template__wrapper .embedpress-premium-features-list .embedpress-premium-features-list-item:nth-child(even) {
    width: auto !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

/* Very narrow screens: let long labels wrap rather than overflow. */
@media (max-width: 600px) {
    .template__wrapper .embedpress-hub-section .ep-plan-card__features li,
    .template__wrapper .embedpress-premium-features-list .embedpress-premium-features-list-item {
        white-space: normal;
    }
}

/* ==========================================================================
   Card grids: fewer columns instead of broken names
   ========================================================================== */

/* Overview > Most Popular Content Types: 4 groups side by side only when
   each group has room for a full source name next to its action icons. */
.template__wrapper .embedpress-popular-content-body {
    container-type: inline-size;
    container-name: ep-popular;
}

@container ep-popular (max-width: 859px) {
    .template__wrapper .embedpress-popular-content-body > .embedpress-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container ep-popular (max-width: 420px) {
    .template__wrapper .embedpress-popular-content-body > .embedpress-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Sources page */
.template__wrapper .source-settings-page .tab-content-section {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
}

/* Elements page */
.template__wrapper .embedpress--elements__wrap .embedpress__row.grid__3 {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
}

/* Go Premium feature grid */
.template__wrapper .upgrage__card__tab__list.ep-upgrade__grid {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

/* ==========================================================================
   Elements page: cards with a brand icon, a docs link and a toggle
   ========================================================================== */

.template__wrapper .ep-elements__head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-elements__head h3 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: 0 !important;
}

.template__wrapper .ep-elements__head p {
    margin: 0;
    font-size: var(--ep-fs-body);
    line-height: 1.6;
    color: var(--ep-text-2);
}

.template__wrapper .embedpress--elements__wrap .element__item {
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px !important;
    background: var(--ep-surface) !important;
    border: 1px solid var(--ep-border) !important;
    box-shadow: var(--ep-shadow);
}

.template__wrapper .embedpress--elements__wrap .element__item:hover {
    border-color: rgba(91, 78, 150, .35) !important;
    box-shadow: var(--ep-shadow-hover);
}

.template__wrapper .element__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ep-border);
    border-radius: 9px;
    background: var(--ep-surface-2);
}

.template__wrapper .element__icon img,
.template__wrapper .element__icon svg {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.template__wrapper .element__text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.template__wrapper .element__text h5 {
    margin: 0 !important;
}

.template__wrapper .element__note {
    font-size: var(--ep-fs-small);
    line-height: 1.4;
    color: var(--ep-muted);
}

/* Docs link: a small icon button with a tooltip above it. */
.template__wrapper .element__docs {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #988fbd;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.template__wrapper .element__docs:hover,
.template__wrapper .element__docs:focus-visible {
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
    outline: none;
}

.template__wrapper .element__docs:focus-visible {
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

.template__wrapper .element__docs .element__tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 10;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--ep-text);
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}

.template__wrapper .element__docs .element__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 5px solid transparent;
    border-top-color: var(--ep-text);
    transform: translateX(-50%);
}

.template__wrapper .element__docs:hover .element__tooltip,
.template__wrapper .element__docs:focus-visible .element__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.template__wrapper .element__item .element_switch {
    flex: none;
    margin: 0 !important;
}

/* ==========================================================================
   "Pro feature" and "Coming soon" modal
   ========================================================================== */

.pro__alert__wrap {
    background: rgba(29, 34, 54, .45) !important;
    backdrop-filter: blur(2px);
}

.pro__alert__wrap .pro__alert__card.ep-pro-alert {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 440px;
    margin: 12vh auto 0;
    padding: 32px 32px 28px;
    border: 1px solid var(--ep-border, #e5e7ef);
    border-radius: 16px;
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(91, 78, 150, .12) 0%, rgba(91, 78, 150, 0) 60%),
        #fff;
    box-shadow: 0 24px 48px rgba(16, 24, 40, .18);
    text-align: center;
}

.pro__alert__wrap .ep-pro-alert .pro__alert__x {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none !important;
    color: #6b7189 !important;
}

.pro__alert__wrap .ep-pro-alert .pro__alert__x:hover {
    background: #f1effa !important;
    color: #5b4e96 !important;
}

.pro__alert__wrap .ep-pro-alert__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff7e6 0%, #ffecc7 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 153, 0, .25);
}

.pro__alert__wrap .ep-pro-alert__icon img {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 !important;
}

.pro__alert__wrap .ep-pro-alert__badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f1effa;
    color: #5b4e96;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pro__alert__wrap .ep-pro-alert h2 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: -.01em;
    color: #1d2236 !important;
}

.pro__alert__wrap .ep-pro-alert p {
    margin: 0 0 22px !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #464c63 !important;
}

.pro__alert__wrap .ep-pro-alert__actions {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 8px;
    width: 100%;
}

.pro__alert__wrap .ep-pro-alert__upgrade,
.pro__alert__wrap .ep-pro-alert .ep-pro-alert__later {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    min-height: 0;
    margin: 0 !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    align-self: stretch !important;
}

.pro__alert__wrap .ep-pro-alert__upgrade {
    border: 0;
    background: #595092;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(89, 80, 146, .28);
}

.pro__alert__wrap .ep-pro-alert__upgrade:hover,
.pro__alert__wrap .ep-pro-alert__upgrade:focus-visible {
    background: #4a4280;
    color: #fff !important;
}

.pro__alert__wrap .ep-pro-alert__upgrade img {
    width: 16px;
    height: 16px;
    margin: 0 !important;
}

.pro__alert__wrap .ep-pro-alert .ep-pro-alert__later {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #6b7189 !important;
    font-weight: 500;
}

.pro__alert__wrap .ep-pro-alert .ep-pro-alert__later:hover {
    background: #f6f7fb !important;
    color: #1d2236 !important;
}

/* ==========================================================================
   Branding > Custom Logo: "Settings" beside the switch, switch on the right
   Settings is always there, so free users can open the panel and try a
   logo; only the switch that turns branding on is Pro.
   ========================================================================== */

.template__wrapper .embedpress__branding .form__group > .form__control__wrap > .logo__adjust__toggler {
    position: static;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 6px 10px;
    border-radius: var(--ep-radius-sm);
    background: transparent;
    color: var(--ep-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    opacity: 1;
    visibility: visible;
}

.template__wrapper .embedpress__branding .form__group > .form__control__wrap > .logo__adjust__toggler i {
    position: static;
    margin-left: 2px;
    font-size: 10px;
    transition: transform .2s ease;
}

.template__wrapper .embedpress__branding .form__group > .form__control__wrap > .logo__adjust__toggler.show i {
    transform: rotate(-180deg);
}

.template__wrapper .embedpress__branding .form__group > .form__control__wrap > .logo__adjust__toggler:hover,
.template__wrapper .embedpress__branding .form__group > .form__control__wrap > .logo__adjust__toggler.show {
    background: var(--ep-primary-soft);
    color: var(--ep-primary);
}

.template__wrapper .embedpress__branding .form__group > .form__control__wrap > .logo__adjust__toggler:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* The switch follows Settings, so it no longer pushes itself right. */
.template__wrapper .embedpress__branding .form__group .logo__adjust__toggler + .input__switch {
    margin-left: 4px !important;
}

/* ==========================================================================
   Getting started card (templates/partials/getting-started.php)
   ========================================================================== */

.template__wrapper .ep-start {
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr) 316px;
    align-items: stretch;
    gap: 28px;
    margin: 0 0 20px;
    padding: 20px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    overflow: hidden;
}

/* Video thumbnail */

.template__wrapper .ep-start__video {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.template__wrapper .ep-start__video-thumb {
    position: relative;
    display: block;
    margin-bottom: 10px;
    aspect-ratio: 16 / 10;
    background: #4b4083;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s ease;
}

.template__wrapper .ep-start__video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .4s ease;
}

.template__wrapper .ep-start__video:hover .ep-start__video-thumb {
    box-shadow: 0 8px 20px -10px rgba(75, 64, 131, .6);
}

.template__wrapper .ep-start__video:hover img {
    transform: scale(1.05);
}

.template__wrapper .ep-start__video:focus-visible {
    outline: none;
}

.template__wrapper .ep-start__video:focus-visible .ep-start__video-thumb {
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* Darken the illustration a little so the play button stands out. */
.template__wrapper .ep-start__video-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 40, .28);
    transition: background .2s ease;
    pointer-events: none;
}

.template__wrapper .ep-start__video:hover .ep-start__video-thumb::after {
    background: rgba(20, 16, 40, .12);
}

/* YouTube-style play button: red rounded rectangle with a white triangle. */
.template__wrapper .ep-start__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 34px;
    padding-left: 2px;
    box-sizing: border-box;
    color: #ffffff;
    background: #ff0033;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(20, 16, 40, .45);
    transform: translate(-50%, -50%);
    transition: transform .2s ease, background .2s ease;
}

.template__wrapper .ep-start__video-play svg {
    width: 14px;
    height: 16px;
}

.template__wrapper .ep-start__video:hover .ep-start__video-play,
.template__wrapper .ep-start__video:focus-visible .ep-start__video-play {
    background: #e6002e;
    transform: translate(-50%, -50%) scale(1.1);
}

.template__wrapper .ep-start__video-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ep-text);
}

.template__wrapper .ep-start__video:hover .ep-start__video-title {
    color: var(--ep-primary);
}

.template__wrapper .ep-start__video-sub {
    font-size: 12px;
    line-height: 1.4;
    color: var(--ep-muted);
}

/* Title, editor switcher and steps */

.template__wrapper .ep-start__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.template__wrapper .ep-start__title {
    margin: 0;
    padding: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ep-text);
}

.template__wrapper .ep-start__tabs {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 8px;
}

.template__wrapper .ep-start__tab {
    padding: 4px 11px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ep-muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.template__wrapper .ep-start__tab:hover {
    color: var(--ep-text);
}

.template__wrapper .ep-start__tab.is-active {
    color: var(--ep-primary);
    background: var(--ep-surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}

.template__wrapper .ep-start__tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--ep-primary-ring);
}

.template__wrapper .ep-start__panel[hidden] {
    display: none;
}

.template__wrapper .ep-start__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Stepper: numbers sit on one line, the text sits under each number. */
.template__wrapper .ep-start__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.template__wrapper .ep-start__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 34px;
    right: -10px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #d9d3f0 0%, #ece9f7 100%);
}

.template__wrapper .ep-start__step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--ep-primary);
    background: var(--ep-surface);
    border: 1.5px solid #cfc7ec;
    border-radius: 50%;
}

.template__wrapper .ep-start__step:first-child .ep-start__step-num {
    color: #ffffff;
    background: var(--ep-primary);
    border-color: var(--ep-primary);
    box-shadow: 0 0 0 4px var(--ep-primary-soft);
}

.template__wrapper .ep-start__step-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.template__wrapper .ep-start__step-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ep-text);
}

.template__wrapper .ep-start__step-title a {
    color: inherit;
    text-decoration: none;
}

.template__wrapper .ep-start__step-title a:hover {
    color: var(--ep-primary);
    text-decoration: underline;
}

.template__wrapper .ep-start__step-text {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ep-muted);
    text-wrap: pretty;
}

.template__wrapper .ep-start__doc {
    display: inline-block;
    margin-top: 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .ep-start__doc::after {
    content: " \2192";
    white-space: pre;
}

.template__wrapper .ep-start__doc:hover {
    text-decoration: underline;
}

/* Pro upsell */

/* Full-height cream panel with a slanted left edge, like the old intro card. */
.template__wrapper .ep-start__pro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin: -20px -20px -20px 0;
    padding: 20px 24px 20px 52px;
    background: #fff9ef;
    clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%);
}

.template__wrapper .ep-start__pro-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ep-text);
}

.template__wrapper .ep-start__pro-title svg {
    color: #c08326;
}

.template__wrapper .ep-start__pro-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.template__wrapper .ep-start__pro-list li {
    position: relative;
    margin: 0;
    padding-left: 15px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ep-text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template__wrapper .ep-start__pro-list li::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 1px;
    width: 7px;
    height: 4px;
    border-left: 1.5px solid #c08326;
    border-bottom: 1.5px solid #c08326;
    transform: rotate(-45deg);
}

.template__wrapper .ep-start__pro-btn {
    align-self: flex-start;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .ep-start__pro-btn::after {
    content: " \2192";
    white-space: pre;
}

.template__wrapper .ep-start__pro-btn:hover,
.template__wrapper .ep-start__pro-btn:focus {
    color: var(--ep-primary-hover);
    text-decoration: underline;
}

/* Medium screens: the Pro box moves under the steps. */
@media only screen and (max-width: 1400px) {
    .template__wrapper .ep-start {
        grid-template-columns: 184px minmax(0, 1fr);
    }

    .template__wrapper .ep-start__pro {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 20px;
        margin: 0 -20px -20px;
        padding: 26px 20px 14px;
        clip-path: polygon(0 12px, 100% 0, 100% 100%, 0 100%);
    }

    .template__wrapper .ep-start__pro-list {
        display: flex;
        flex-wrap: wrap;
        flex: 1 1 0;
        min-width: 0;
        gap: 4px 16px;
    }

    .template__wrapper .ep-start__pro-btn {
        align-self: center;
        white-space: nowrap;
    }
}

/* Narrow screens: the video gets its own row so the steps keep full width. */
@media only screen and (max-width: 1100px) {
    .template__wrapper .ep-start {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .template__wrapper .ep-start__video {
        display: grid;
        grid-template-columns: 140px minmax(0, 1fr);
        grid-template-rows: 1fr auto auto 1fr;
        column-gap: 14px;
    }

    .template__wrapper .ep-start__video-thumb {
        grid-row: 1 / -1;
        margin-bottom: 0;
    }

    .template__wrapper .ep-start__video-title {
        grid-column: 2;
        grid-row: 2;
    }

    .template__wrapper .ep-start__video-sub {
        grid-column: 2;
        grid-row: 3;
    }
}

@media only screen and (max-width: 782px) {
    .template__wrapper .ep-start {
        padding: 16px;
    }

    .template__wrapper .ep-start__steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .template__wrapper .ep-start__steps {
        gap: 14px;
    }

    .template__wrapper .ep-start__step {
        flex-direction: row;
        gap: 12px;
    }

    .template__wrapper .ep-start__step:not(:last-child)::after {
        top: 32px;
        bottom: -10px;
        left: 12px;
        right: auto;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, #d9d3f0 0%, #ece9f7 100%);
    }

    .template__wrapper .ep-start__step-body {
        padding-top: 3px;
    }

    .template__wrapper .ep-start__pro {
        flex-direction: column;
        align-items: flex-start;
        margin: 0 -16px -16px;
        padding: 26px 16px 16px;
    }

    .template__wrapper .ep-start__pro-list {
        flex: 0 0 auto;
    }

    .template__wrapper .ep-start__pro-btn {
        align-self: flex-start;
    }
}

/* ==========================================================================
   Popular content types, redesigned (templates/hub.php, .ep-popular)
   ========================================================================== */

.template__wrapper .embedpress-hub-section .ep-popular {
    margin-top: 20px;
    padding: 18px 20px 8px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
}

.template__wrapper .embedpress-hub-section .ep-popular__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 20px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .embedpress-hub-section .ep-popular__title {
    margin: 0 0 2px;
    padding: 0;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ep-text);
}

.template__wrapper .embedpress-hub-section .ep-popular__lead {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ep-muted);
}

.template__wrapper .embedpress-hub-section .ep-popular__all {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .embedpress-hub-section .ep-popular__all::after {
    content: " \2192";
    white-space: pre;
}

.template__wrapper .embedpress-hub-section .ep-popular__all:hover {
    color: var(--ep-primary-hover);
    text-decoration: underline;
}

/* One row per category: label on the left, source tiles on the right. */
.template__wrapper .embedpress-hub-section .ep-popular__row {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    align-items: center;
    gap: 10px 16px;
    padding: 12px 0;
}

.template__wrapper .embedpress-hub-section .ep-popular__row + .ep-popular__row {
    border-top: 1px dashed var(--ep-border);
}

.template__wrapper .embedpress-hub-section .ep-popular__cat {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-text-2);
}

.template__wrapper .embedpress-hub-section .ep-popular__cat img {
    width: 16px;
    height: 16px;
    opacity: .75;
    /* Same black for every category icon (social.svg is coral by default). */
    filter: brightness(0);
}

.template__wrapper .embedpress-hub-section .ep-popular__count {
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    color: var(--ep-muted);
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 999px;
}

.template__wrapper .embedpress-hub-section .ep-popular__items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.template__wrapper .embedpress-hub-section .ep-popular__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 7px 6px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 9px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.template__wrapper .embedpress-hub-section .ep-popular__item:hover {
    background: var(--ep-surface);
    border-color: var(--ep-border-strong);
    box-shadow: var(--ep-shadow-hover);
}

.template__wrapper .embedpress-hub-section .ep-popular__icon {
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: 7px;
}

.template__wrapper .embedpress-hub-section .ep-popular__icon img {
    max-width: 18px;
    max-height: 18px;
}

.template__wrapper .embedpress-hub-section .ep-popular__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ep-text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.template__wrapper .embedpress-hub-section .ep-popular__badge {
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f7a4f;
    background: #e3f5ec;
    border-radius: 999px;
}

.template__wrapper .embedpress-hub-section /* Settings and docs icons sit over the tile's right edge and show on hover or focus. */
.ep-popular__actions {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    gap: 2px;
    padding-left: 14px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, var(--ep-surface) 14px);
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .15s ease;
}

.template__wrapper .embedpress-hub-section .ep-popular__item:hover .ep-popular__actions,
.template__wrapper .embedpress-hub-section .ep-popular__item:focus-within .ep-popular__actions {
    opacity: 1;
}

@media (hover: none) {
    .template__wrapper .embedpress-hub-section .ep-popular__actions {
        position: static;
        padding-left: 0;
        background: none;
        opacity: 1;
        transform: none;
    }
}

.template__wrapper .embedpress-hub-section .ep-popular__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #988fbd;
    border-radius: 6px;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease;
}

.template__wrapper .embedpress-hub-section .ep-popular__action:hover,
.template__wrapper .embedpress-hub-section .ep-popular__action:focus-visible {
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
    outline: none;
}

@media only screen and (max-width: 782px) {
    .template__wrapper .embedpress-hub-section .ep-popular {
        padding: 16px 16px 6px;
    }

}


/* Old popular card in four columns: trim spacing so full source names fit. */
.template__wrapper .embedpress-hub-section .embedpress-popular-content-cards {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.template__wrapper .embedpress-hub-section .embedpress-popular-content-list-item {
    padding-left: 8px !important;
    padding-right: 4px !important;
}

.template__wrapper .embedpress-hub-section .embedpress-popular-content-list-item .embedpress-hub-item-link {
    width: 22px !important;
    height: 22px !important;
}

.template__wrapper .embedpress-hub-section .embedpress-popular-content-list-item .content-item-wrapper {
    gap: 6px !important;
    min-width: 0;
}

.template__wrapper .embedpress-hub-section .embedpress-popular-content-list-item .content-item-wrapper .embedpress-font-m {
    overflow: hidden;
    font-size: 12.5px !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Popular rows follow the section's own width: each category always has
   five sources, and a tile needs about 148px for its full name. */
.template__wrapper .embedpress-hub-section .ep-popular__rows {
    container-type: inline-size;
    container-name: ep-popular-rows;
}

@container ep-popular-rows (max-width: 919px) {
    .template__wrapper .embedpress-hub-section .ep-popular__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
}

@container ep-popular-rows (max-width: 759px) {
    .template__wrapper .embedpress-hub-section .ep-popular__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container ep-popular-rows (max-width: 455px) {
    .template__wrapper .embedpress-hub-section .ep-popular__items {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==========================================================================
   Instagram settings (templates/instagram.php, .ep-ig)
   ========================================================================== */

.template__wrapper .ep-ig h3,
.template__wrapper .ep-ig h4 {
    margin: 0;
    padding: 0;
    border: 0 !important;
}

.template__wrapper .ep-ig__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ep-border);
}

/* The official Instagram logo (images/sources/icons/instagram.svg). */
.template__wrapper .ep-ig__logo,
.template__wrapper .ep-ig__empty-icon {
    display: block;
    flex: 0 0 auto;
    max-width: none;
    height: auto;
}

.template__wrapper .ep-ig__logo {
    width: 40px;
    height: 40px;
}

.template__wrapper .ep-ig__intro {
    flex: 1 1 260px;
    min-width: 0;
}

.template__wrapper .ep-ig__intro h3 {
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    color: var(--ep-text);
}

.template__wrapper .ep-ig__intro p {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ep-muted);
}

.template__wrapper .ep-ig__head-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.template__wrapper .ep-ig__doc {
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .ep-ig__doc::after {
    content: " \2197";
}

.template__wrapper .ep-ig__doc:hover {
    color: var(--ep-primary-hover);
    text-decoration: underline;
}

/* Primary button: replaces the old blue WordPress-style button. */
.template__wrapper .ep-ig .account-button.ep-ig__btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff !important;
    background: var(--ep-primary) !important;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.template__wrapper .ep-ig .account-button.ep-ig__btn:hover,
.template__wrapper .ep-ig .account-button.ep-ig__btn:focus-visible {
    background: var(--ep-primary-hover) !important;
    box-shadow: 0 6px 16px -8px rgba(91, 78, 150, .7);
    outline: none;
}

.template__wrapper .ep-ig .account-button.ep-ig__btn svg {
    width: 16px;
    height: 16px;
}

/* Empty state */
.template__wrapper .ep-ig .no-account-connected.ep-ig__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 36px 24px 28px;
    text-align: center;
    background: var(--ep-surface-2);
    border: 1px dashed var(--ep-border-strong);
    border-radius: 12px;
}

.template__wrapper .ep-ig__empty-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
}

.template__wrapper .ep-ig__empty h4 {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4;
    color: var(--ep-text);
}

.template__wrapper .ep-ig__empty p {
    max-width: 440px;
    margin: 6px 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ep-muted);
}

.template__wrapper .ep-ig__steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin: 22px 0 0;
    padding: 18px 0 0;
    list-style: none;
    border-top: 1px solid var(--ep-border);
}

.template__wrapper .ep-ig__steps li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12.5px;
    color: var(--ep-text-2);
}

.template__wrapper .ep-ig__steps li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
    border-radius: 50%;
}

.template__wrapper .ep-ig__steps a {
    color: var(--ep-primary);
    font-weight: 500;
    text-decoration: none;
}

.template__wrapper .ep-ig__steps a:hover {
    text-decoration: underline;
}

/* Connected accounts table */
.template__wrapper .ep-ig__table td {
    vertical-align: middle;
}

.template__wrapper .ep-ig__table td.instagram-user-account {
    display: table-cell;
    white-space: nowrap;
    text-align: left;
}

.template__wrapper .ep-ig__table tbody tr:last-child td.instagram-user-account {
    border-bottom: 0;
}

.template__wrapper .ep-ig__table th:first-child {
    text-align: left;
}

.template__wrapper .ep-ig__table .user-image {
    display: inline-flex;
    width: 36px;
    margin-right: 10px;
    vertical-align: middle;
}

.template__wrapper .ep-ig__table .user-image + div {
    display: inline-block;
    vertical-align: middle;
}

.template__wrapper .ep-ig__table img.user-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #e1306c;
}

.template__wrapper .ep-ig__table .username {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ep-text);
}

.template__wrapper .ep-ig__table .userid {
    font-size: 12px;
    line-height: 1.35;
    color: var(--ep-muted);
}

.template__wrapper .ep-ig__token input {
    width: 100%;
    max-width: 220px;
    padding: 5px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: var(--ep-text-2);
    text-overflow: ellipsis;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 6px;
}

.template__wrapper .ep-ig__type {
    display: inline-block;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
    border-radius: 999px;
}

.template__wrapper .ep-ig .user-profile-link.ep-ig__ghost {
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ep-primary);
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: 6px;
}

.template__wrapper .ep-ig .user-profile-link.ep-ig__ghost:hover {
    background: var(--ep-primary-soft);
    border-color: #d9d3f0;
}

.template__wrapper .ep-ig__table td.instagram-sync-data .dashicons {
    width: 30px;
    height: 30px;
    padding: 5px;
    box-sizing: border-box;
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
    border-radius: 8px;
}

.template__wrapper .ep-ig__table td.instagram-action-btns {
    white-space: nowrap;
}

.template__wrapper .ep-ig__table td.instagram-action-btns .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-height: 30px;
    height: 30px;
    padding: 0;
    margin-right: 4px;
    background: var(--ep-surface) !important;
    border: 1px solid var(--ep-border) !important;
    border-radius: 8px;
}

.template__wrapper .ep-ig__table td.instagram-action-btns .button .dashicons {
    color: var(--ep-text-2) !important;
}

.template__wrapper .ep-ig__table td.instagram-action-btns .ep-ig-sc-trigger:hover {
    background: var(--ep-primary-soft) !important;
    border-color: #d9d3f0 !important;
}

.template__wrapper .ep-ig__table td.instagram-action-btns .ep-ig-sc-trigger:hover .dashicons {
    color: var(--ep-primary) !important;
}

.template__wrapper .ep-ig__table td.instagram-action-btns .account-delete-button:hover {
    background: #fdecec !important;
    border-color: #f5c2c2 !important;
}

.template__wrapper .ep-ig__table td.instagram-action-btns .account-delete-button:hover .dashicons {
    color: #c62828 !important;
}

/* Connect dialog */
.template__wrapper .ep-ig .modal-overlay {
    background-color: rgba(17, 14, 35, .55);
}

.template__wrapper .ep-ig .modal {
    width: 440px;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 48px);
    padding: 0;
    overflow: auto;
    background: var(--ep-surface);
    border-radius: 14px;
    box-shadow: 0 24px 60px -20px rgba(17, 14, 35, .45);
}

.template__wrapper .ep-ig form#instagram-form {
    position: relative;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.template__wrapper .ep-ig form#instagram-form .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 13px;
    line-height: 1;
    color: var(--ep-muted);
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 8px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.template__wrapper .ep-ig form#instagram-form .close-btn:hover {
    color: var(--ep-text);
    background: var(--ep-border);
}

.template__wrapper .ep-ig__form-title {
    padding-right: 40px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    color: var(--ep-text);
}

.template__wrapper .ep-ig__form-lead {
    margin: 4px 0 18px;
    padding-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ep-muted);
    border-bottom: 1px solid var(--ep-border);
}

.template__wrapper .ep-ig form#instagram-form label {
    display: block;
    margin: 0 0 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-text-2);
}

.template__wrapper .ep-ig form#instagram-form .form-group {
    margin: 0 0 14px;
}

.template__wrapper .ep-ig form#instagram-form .form__control {
    display: block;
    width: 100%;
    max-width: none;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 13.5px;
    line-height: 38px;
    color: var(--ep-text);
    background-color: var(--ep-surface);
    border: 1px solid var(--ep-border-strong);
    border-radius: 8px;
    box-shadow: none;
}

.template__wrapper .ep-ig form#instagram-form select.form__control {
    padding-right: 36px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7189' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

.template__wrapper .ep-ig form#instagram-form .form__control:focus {
    border-color: var(--ep-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--ep-primary-ring);
}

/* Error message the connect script inserts after the token field. */
.template__wrapper .ep-ig form#instagram-form > p:not(.ep-ig__form-lead) {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: #c62828;
}

.template__wrapper .ep-ig form#instagram-form .form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.template__wrapper .ep-ig form#instagram-form button[type="submit"] {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: var(--ep-primary);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.template__wrapper .ep-ig form#instagram-form button[type="submit"]:hover {
    background: var(--ep-primary-hover);
}

.template__wrapper .ep-ig form#instagram-form .for-personal,
.template__wrapper .ep-ig form#instagram-form .for-business {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-primary);
    text-decoration: none;
}

.template__wrapper .ep-ig form#instagram-form .for-personal::after,
.template__wrapper .ep-ig form#instagram-form .for-business::after {
    content: " \2197";
}

.template__wrapper .ep-ig form#instagram-form .for-personal:hover,
.template__wrapper .ep-ig form#instagram-form .for-business:hover {
    text-decoration: underline;
}

.template__wrapper .ep-ig form#instagram-form .hidden {
    display: none;
}

@media only screen and (max-width: 782px) {
    .template__wrapper .ep-ig__head-actions {
        width: 100%;
    }

    .template__wrapper .ep-ig__accounts {
        overflow-x: auto;
    }

    .template__wrapper .ep-ig__steps {
        flex-direction: column;
        align-items: flex-start;
        align-self: center;
    }
}

/* ==========================================================================
   Elements page tabs (templates/elements.php, .ep-elements-tabs)
   ========================================================================== */

.template__wrapper .ep-elements-tabs__nav {
    display: flex;
    gap: 4px;
    margin: -4px 0 18px;
    border-bottom: 1px solid var(--ep-border);
    overflow-x: auto;
}

.template__wrapper .ep-elements-tabs__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 -1px;
    padding: 10px 14px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ep-muted);
    white-space: nowrap;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.template__wrapper .ep-elements-tabs__tab:hover {
    color: var(--ep-text);
}

.template__wrapper .ep-elements-tabs__tab.is-active {
    color: var(--ep-primary);
    border-bottom-color: var(--ep-primary);
}

.template__wrapper .ep-elements-tabs__tab:focus-visible {
    outline: none;
    border-radius: 6px 6px 0 0;
    box-shadow: inset 0 0 0 2px var(--ep-primary-ring);
}

.template__wrapper .ep-elements-tabs__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 600;
    color: var(--ep-muted);
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 999px;
}

.template__wrapper .ep-elements-tabs__tab.is-active .ep-elements-tabs__count {
    color: var(--ep-primary);
    background: var(--ep-primary-soft);
    border-color: #ddd6f3;
}

.template__wrapper .ep-elements-tabs__panel[hidden] {
    display: none !important;
}

/* The tab already names the editor, so the panel goes straight to its grid. */
.template__wrapper .ep-elements-tabs .ep-elements__head {
    display: none;
}

@media only screen and (max-width: 600px) {
    .template__wrapper .ep-elements-tabs__tab {
        flex: 1 1 auto;
        justify-content: center;
        gap: 6px;
        padding: 10px 8px 12px;
        font-size: 13px;
    }
}

@media only screen and (max-width: 480px) {
    .template__wrapper .ep-elements-tabs__count {
        display: none;
    }
}

/* Three elements per row in the tabbed card; fewer when the card is narrow. */
.template__wrapper .ep-elements-tabs {
    container-type: inline-size;
    container-name: ep-elements;
}

.template__wrapper .ep-elements-tabs .embedpress--elements__wrap .embedpress__row.grid__3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@container ep-elements (max-width: 908px) {
    .template__wrapper .ep-elements-tabs .embedpress--elements__wrap .embedpress__row.grid__3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@container ep-elements (max-width: 560px) {
    .template__wrapper .ep-elements-tabs .embedpress--elements__wrap .embedpress__row.grid__3 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Compact cards for three columns: the docs link shows on hover or focus
   (always on touch screens), so full element names fit on one line. */
.template__wrapper .ep-elements-tabs .element__item {
    position: relative;
    gap: 8px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.template__wrapper .ep-elements-tabs .element__text {
    min-width: 0;
}

.template__wrapper .ep-elements-tabs .element__text h5 {
    overflow: hidden;
    font-size: 13px !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.template__wrapper .ep-elements-tabs .element__item .element__docs {
    position: absolute !important;
    top: 50%;
    right: 54px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity .15s ease;
}

.template__wrapper .ep-elements-tabs .element__item:hover .element__docs,
.template__wrapper .ep-elements-tabs .element__item:focus-within .element__docs {
    opacity: 1;
}

@media (hover: none) {
    .template__wrapper .ep-elements-tabs .element__item .element__docs {
        position: static !important;
        opacity: 1;
        transform: none;
    }

    .template__wrapper .ep-elements-tabs .element__text h5 {
        white-space: normal;
    }
}

/* ==========================================================================
   Settings > PDF Custom Color (templates/settings.php, .ep-pdf-color-group)
   ========================================================================== */

/* Keep the switch on the right edge like every other row; "Settings" sits to its left. */
.template__wrapper .ep-pdf-color-group > .form__control__wrap > .input__switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.template__wrapper .ep-pdf-color-group > .form__control__wrap > .input__switch .logo__adjust__toggler {
    order: -1;
    margin: 0 !important;
}

.template__wrapper .ep-pdf-color {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    background: var(--ep-surface-2);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
}

.template__wrapper .ep-pdf-color__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
}

.template__wrapper .ep-pdf-color__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.template__wrapper .ep-pdf-color__text label {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.4;
    color: var(--ep-text);
    white-space: nowrap;
}

.template__wrapper .ep-pdf-color__text span {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ep-muted);
}

.template__wrapper .ep-pdf-color__picker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border-strong);
    border-radius: 8px;
}

.template__wrapper .ep-pdf-color__picker input[type="color"] {
    width: 34px !important;
    height: 30px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    border-radius: 6px;
    box-shadow: none !important;
    cursor: pointer;
}

.template__wrapper .ep-pdf-color__picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.template__wrapper .ep-pdf-color__picker input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 6px;
}

.template__wrapper .ep-pdf-color__picker input[type="color"]::-moz-color-swatch {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 6px;
}

.template__wrapper .ep-pdf-color__hex {
    min-width: 64px;
    padding: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: var(--ep-text-2);
    background: none;
}

/* Live preview: a small PDF viewer with the chosen toolbar color. */
.template__wrapper .ep-pdf-color__preview {
    --ep-pdf-toolbar: #333333;
    display: block;
    overflow: hidden;
    background: #eceef3;
    border: 1px solid var(--ep-border);
    border-radius: 8px;
}

.template__wrapper .ep-pdf-color__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    background: var(--ep-pdf-toolbar);
}

.template__wrapper .ep-pdf-color__bar i {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, .7);
    border-radius: 3px;
}

.template__wrapper .ep-pdf-color__bar b {
    flex: 1 1 auto;
    height: 6px;
    margin: 0 8px;
    background: rgba(255, 255, 255, .25);
    border-radius: 3px;
}

.template__wrapper .ep-pdf-color__page {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 55%;
    max-width: 240px;
    margin: 10px auto;
    padding: 12px;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.template__wrapper .ep-pdf-color__page em {
    height: 5px;
    background: #e4e6ec;
    border-radius: 3px;
}

.template__wrapper .ep-pdf-color__page em:nth-child(2) {
    width: 80%;
}

.template__wrapper .ep-pdf-color__page em:nth-child(3) {
    width: 60%;
}

/* Smaller New / Updated / Popular ribbons on source cards. */
.template__wrapper .source-item .ribbon-container {
    top: -8px !important;
    height: 16px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    line-height: 14px !important;
    letter-spacing: 0.02em !important;
    border-radius: 3px !important;
}
