.stanloop-video-links {
    margin: 32px 0;
}

.stanloop-video-links__header {
    margin-bottom: 18px;
}

.stanloop-video-links__header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.stanloop-video-links__header p {
    margin: 0;
    color: #555;
}

.stanloop-video-links__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.stanloop-video-card {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.stanloop-video-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.stanloop-video-card p {
    margin: 0 0 16px;
    color: #444;
}

.stanloop-video-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stanloop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.stanloop-button:hover {
    color: #fff;
    text-decoration: none;
}

.stanloop-button--secondary {
    background: #f3f4f6;
    color: #111827;
}

.stanloop-button--secondary:hover {
    color: #111827;
}

.stanloop-empty {
    color: #666;
}

@media (max-width: 700px) {
    .stanloop-video-links__grid {
        grid-template-columns: 1fr;
    }

    .stanloop-video-card__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.stanloop-video-links-profile-tab {
    width: 100%;
}

.stanloop-video-links-profile-tab .stanloop-video-links {
    margin-top: 0;
}

.stanloop-video-links .stanloop-video-card {
    overflow-wrap: anywhere;
}

.stanloop-video-links .stanloop-button {
    line-height: 1.2;
}

.stanloop-video-links-manage {
    margin: 32px 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    overflow-wrap: anywhere;
}

.stanloop-video-links-manage h3 {
    margin-bottom: 18px;
}

.stanloop-field input,
.stanloop-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

.stanloop-manage-list {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.stanloop-manage-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
}

.stanloop-notice {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #FFFCF4;
    border: 1px solid #D6D9DF;
    color: #17233A;
}

.stanloop-video-links-profile-tab .stanloop-video-links-manage {
    margin-top: 0;
}

@media (max-width: 700px) {
    .stanloop-video-links-manage,
    .stanloop-manage-list {
        padding: 14px;
    }

    .stanloop-manage-row {
        flex-direction: column;
    }
}

/* v0.1.63 YouTube enriched video cards */
.stanloop-video-card--youtube {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stanloop-video-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
    text-decoration: none;
}

.stanloop-video-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 160ms ease;
}

.stanloop-video-card__media:hover img {
    transform: scale(1.03);
}

.stanloop-video-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.86);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    padding-left: 3px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.22);
}

.stanloop-video-card__body {
    padding: 18px;
}

.stanloop-video-card__source {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--bb-primary-color, #4f46e5);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.stanloop-video-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: -2px 0 12px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.35;
}

.stanloop-video-card__creator-note {
    padding: 11px 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #eef2f7;
}

.stanloop-video-card__description {
    color: #4b5563;
}

.stanloop-button--discussed {
    background: var(--bb-primary-color, #4f46e5);
    color: #fff;
}

.stanloop-button--discussed:hover {
    color: #fff;
}

.stanloop-field-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.stanloop-manage-row__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stanloop-manage-row__main small {
    color: #6b7280;
    line-height: 1.4;
}

.stanloop-notice--warning {
    background: #F3F6FA;
    border-color: #FFDA70;
    color: #8A6700;
}

@media (max-width: 700px) {
    .stanloop-video-card__body {
        padding: 15px;
    }

    .stanloop-video-card__play {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
}

/* v0.1.64 Safe Instagram/manual video cards */
.stanloop-video-card--instagram,
.stanloop-video-card--manual {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stanloop-video-card--instagram .stanloop-video-card__source {
    background: #fff1f2;
    color: #be185d;
}

.stanloop-video-card__media--placeholder {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff1f2 0%, #eef2ff 100%);
    color: #be185d;
}

.stanloop-video-card__placeholder-icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
    font-size: 28px;
    font-weight: 800;
}

.stanloop-video-card__placeholder-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stanloop-video-link-thumb-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: -2px 0 14px;
    padding: 12px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #f9fafb;
}

.stanloop-video-link-thumb-preview img {
    width: 140px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.stanloop-video-link-thumb-preview label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #374151;
    font-size: 13px;
}

/* v0.1.65 format-aware Video vs Shorts/Reels layout */
.stanloop-video-links__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.stanloop-video-links__filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.stanloop-video-links__filter:hover,
.stanloop-video-links__filter:focus {
    color: var(--bb-primary-color, #4f46e5);
    border-color: var(--bb-primary-color, #4f46e5);
    text-decoration: none;
}

.stanloop-video-links__filter.is-active {
    background: var(--bb-primary-color, #4f46e5);
    border-color: var(--bb-primary-color, #4f46e5);
    color: #fff;
}

.stanloop-video-links__grid--filter-shorts {
    grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
    align-items: start;
}

.stanloop-video-links__grid--filter-videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stanloop-video-card--format-long-video .stanloop-video-card__media {
    aspect-ratio: 16 / 9;
}

.stanloop-video-card--format-short-reel {
    max-width: 360px;
    justify-self: start;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__media {
    aspect-ratio: 9 / 16;
    background: #111827;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__media img {
    object-fit: contain;
    background: #111827;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__media--placeholder {
    min-height: 360px;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__body {
    padding: 15px;
}

.stanloop-video-card--format-short-reel h3 {
    font-size: 18px;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__description {
    font-size: 14px;
}

.stanloop-field select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

.stanloop-video-card--instagram.stanloop-video-card--format-short-reel .stanloop-video-card__source {
    background: #fff1f2;
    color: #be185d;
}

.stanloop-video-link-thumb-preview img {
    object-fit: contain;
    background: #111827;
}

@media (max-width: 900px) {
    .stanloop-video-links__grid,
    .stanloop-video-links__grid--filter-videos,
    .stanloop-video-links__grid--filter-shorts {
        grid-template-columns: 1fr;
    }

    .stanloop-video-card--format-short-reel {
        max-width: 100%;
        justify-self: stretch;
    }
}

/* v0.2.03 Mentioned Links card redesign */
.stanloop-video-links{margin:0}
.stanloop-video-links__header{margin-bottom:14px}
.stanloop-video-links__filters{justify-content:flex-start;margin:0 0 18px;gap:8px}
.stanloop-video-links__filter{min-height:38px;padding:8px 16px;border-color:#E5E8EC;border-radius:10px;background:#fff;color:#233044;font-size:13px;font-weight:800}
.stanloop-video-links__filter:hover,.stanloop-video-links__filter:focus{border-color:#17233A;color:#17233A}
.stanloop-video-links__filter.is-active{background:#17233A;border-color:#17233A;color:#fff;box-shadow:0 8px 18px rgba(23, 35, 58,.18)}
.stanloop-video-links__grid--filter-shorts{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.stanloop-video-links__grid--filter-videos{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.stanloop-video-card,.stanloop-video-card--format-short-reel{max-width:none;justify-self:stretch;padding:0;border:1px solid #FFE082;border-radius:16px;overflow:visible;background:#fff;box-shadow:0 8px 24px rgba(23, 35, 58,.05)}
.stanloop-video-card__body{padding:14px}
.stanloop-video-card h3{margin:0 0 12px;color:#111827;font-size:18px;line-height:1.25;font-weight:850}
.stanloop-video-card--format-short-reel h3{font-size:16px;text-align:center;min-height:40px}
.stanloop-video-card--format-short-reel .stanloop-video-card__media{aspect-ratio:9/13;max-height:420px;background:#111827}
.stanloop-video-card--format-short-reel .stanloop-video-card__media img{object-fit:cover}
.stanloop-video-card__source,.stanloop-video-card__meta,.stanloop-video-card__creator-note,.stanloop-video-card__description{display:none!important}
.stanloop-video-card__mentioned-link{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:42px;padding:10px 14px;border:1px solid #17233A;border-radius:10px;background:#17233A;color:#fff!important;font-size:13px;font-weight:850;text-align:center;text-decoration:none;box-shadow:0 8px 18px rgba(23, 35, 58,.16)}
.stanloop-video-card__mentioned-link:hover,.stanloop-video-card__mentioned-link:focus{background:#17233A;border-color:#17233A;color:#fff!important;text-decoration:none;transform:translateY(-1px)}
.stanloop-video-card__mentioned-link.is-disabled{background:#f2f4f1;border-color:#e3e8e0;color:#879184!important;box-shadow:none;cursor:not-allowed}
.stanloop-video-card__utility-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:9px;align-items:stretch}
.stanloop-video-card__utility-button,.stanloop-video-card__save-wrap .stanloop-button{display:flex!important;align-items:center;justify-content:center;gap:6px;width:100%!important;min-width:0;min-height:38px;margin:0;padding:8px 9px;border:1px solid #E5E8EC!important;border-radius:9px!important;background:#fff!important;color:#273548!important;font-size:12px!important;font-weight:800!important;line-height:1.1;text-decoration:none;box-shadow:none;cursor:pointer}
.stanloop-video-card__utility-button:hover,.stanloop-video-card__utility-button:focus,.stanloop-video-card__save-wrap .stanloop-button:hover{border-color:#B8C0CC!important;background:#FFFCF4!important;color:#17233A!important}
.stanloop-video-card__save-wrap,.stanloop-video-card__save-wrap .stanloop-save-form{display:flex;width:100%;margin:0}
.stanloop-video-card__save-wrap .stanloop-save-button:before{content:"♡";font-size:15px}
.stanloop-video-card__save-wrap .stanloop-save-button.is-saved:before{content:"♥"}
.stanloop-video-card__description-control{position:relative;min-width:0}
.stanloop-video-card__description-popover{position:absolute;left:0;bottom:calc(100% + 10px);z-index:80;width:min(300px,80vw);padding:12px 13px;border:1px solid #E5E8EC;border-radius:12px;background:#fff;color:#344054;font-size:12px;line-height:1.5;text-align:left;box-shadow:0 18px 44px rgba(15,23,42,.18);opacity:0;visibility:hidden;transform:translateY(6px);transition:.16s ease;pointer-events:none}
.stanloop-video-card__description-control:hover .stanloop-video-card__description-popover,.stanloop-video-card__description-control:focus-within .stanloop-video-card__description-popover,.stanloop-video-card__description-control.is-open .stanloop-video-card__description-popover{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}
.stanloop-video-card__media{border-radius:15px 15px 0 0;overflow:hidden}
.stanloop-video-card__play{background:rgba(17,24,39,.82)}
@media(max-width:1024px){.stanloop-video-links__grid--filter-shorts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.stanloop-video-links__grid--filter-shorts,.stanloop-video-links__grid--filter-videos{grid-template-columns:1fr}.stanloop-video-card--format-short-reel .stanloop-video-card__media{aspect-ratio:9/14;max-height:520px}.stanloop-video-card__utility-row{grid-template-columns:repeat(3,minmax(0,1fr))}.stanloop-video-card__description-popover{position:fixed;left:16px;right:16px;bottom:24px;width:auto;max-height:40vh;overflow:auto}.stanloop-video-links__filters{position:sticky;top:0;z-index:10;padding:8px 0;background:rgba(255,255,255,.96)}}


/* v0.2.04 Equal-height Mentioned Links card actions */
.stanloop-video-card--youtube,
.stanloop-video-card--instagram,
.stanloop-video-card--manual {
    height: 100%;
}

.stanloop-video-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.stanloop-video-card h3,
.stanloop-video-card--format-short-reel h3 {
    display: -webkit-box;
    min-height: 45px;
    max-height: 45px;
    margin-bottom: 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.stanloop-video-card__mentioned-link {
    margin-top: auto;
}

@media (max-width: 700px) {
    .stanloop-video-card h3,
    .stanloop-video-card--format-short-reel h3 {
        min-height: 42px;
        max-height: 42px;
    }
}


/* v0.2.05 Mentioned Links creator UX and relaxed card spacing */
.stanloop-video-links__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.stanloop-video-links__heading-copy {
    min-width: 0;
}

.stanloop-video-links__add-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid #17233A;
    border-radius: 10px;
    background: #17233A;
    color: #fff !important;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(23, 35, 58, .16);
}

.stanloop-video-links__add-button:hover,
.stanloop-video-links__add-button:focus {
    background: #17233A;
    border-color: #17233A;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.stanloop-video-links__grid--filter-shorts {
    column-gap: 24px;
    row-gap: 28px;
}

.stanloop-video-links__grid--filter-videos {
    column-gap: 28px;
    row-gap: 30px;
}

.stanloop-video-card__mentioned-link {
    align-self: flex-start;
    width: auto;
    min-width: 190px;
    max-width: 100%;
    padding-inline: 18px;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__mentioned-link {
    align-self: center;
}

.stanloop-video-card__utility-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 9px;
}

.stanloop-video-card__description-control,
.stanloop-video-card__save-wrap,
.stanloop-video-card__edit-button,
.stanloop-video-card__share-button {
    flex: 0 1 auto;
    width: auto;
    min-width: 112px;
}

.stanloop-video-card__utility-button,
.stanloop-video-card__save-wrap .stanloop-button {
    width: auto !important;
    min-width: 112px;
    padding-inline: 13px;
    border-color: #E5E8EC !important;
    background: #FFFCF4 !important;
    color: #17233A !important;
}

.stanloop-video-card__utility-button:hover,
.stanloop-video-card__utility-button:focus,
.stanloop-video-card__save-wrap .stanloop-button:hover,
.stanloop-video-card__save-wrap .stanloop-button:focus {
    border-color: #B8C0CC !important;
    background: #F3F6FA !important;
    color: #17233A !important;
}

.stanloop-video-card__edit-button {
    text-decoration: none;
}

.stanloop-ai-assistant--mentioned-link-builder .stanloop-ai-assistant__hero--compact {
    margin-bottom: 18px;
}

.stanloop-ai-assistant__builder-back {
    display: inline-flex;
    margin-top: 10px;
    color: #17233A;
    font-weight: 800;
    text-decoration: none;
}

.stanloop-ai-assistant__builder-back:hover,
.stanloop-ai-assistant__builder-back:focus {
    color: #17233A;
    text-decoration: underline;
}

.stanloop-ai-assistant--mentioned-link-builder .stanloop-video-links-manage {
    margin-top: 0;
    border-color: #FFE082;
    box-shadow: 0 10px 28px rgba(23, 35, 58, .06);
}

@media (max-width: 700px) {
    .stanloop-video-links__header {
        align-items: center;
    }

    .stanloop-video-links__add-button {
        min-width: 72px;
    }

    .stanloop-video-links__grid--filter-shorts,
    .stanloop-video-links__grid--filter-videos {
        row-gap: 24px;
    }

    .stanloop-video-card__mentioned-link {
        align-self: stretch;
        width: 100%;
    }

    .stanloop-video-card__utility-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stanloop-video-card__description-control,
    .stanloop-video-card__save-wrap,
    .stanloop-video-card__edit-button,
    .stanloop-video-card__share-button,
    .stanloop-video-card__utility-button,
    .stanloop-video-card__save-wrap .stanloop-button {
        width: 100% !important;
        min-width: 0;
    }
}


/* v0.2.06 Mentioned Links action alignment and modern editor controls */
.stanloop-video-card__body {
    align-items: stretch;
}

.stanloop-video-card--format-short-reel h3 {
    text-align: left;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__mentioned-link,
.stanloop-video-card__mentioned-link {
    align-self: flex-start;
}

.stanloop-video-card__utility-row {
    width: 100%;
    display: grid;
    align-items: stretch;
    gap: 9px;
}

.stanloop-video-card__utility-row--count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stanloop-video-card__utility-row--count-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stanloop-video-card__description-control,
.stanloop-video-card__save-wrap,
.stanloop-video-card__edit-button,
.stanloop-video-card__share-button {
    min-width: 0;
    width: 100%;
}

.stanloop-video-card__utility-button,
.stanloop-video-card__save-wrap .stanloop-button {
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 11.5px !important;
}

.stanloop-video-card__utility-button > span:last-child,
.stanloop-video-card__save-wrap .stanloop-button {
    overflow: hidden;
    text-overflow: ellipsis;
}

.stanloop-video-link-form {
    display: grid;
    gap: 16px;
}

.stanloop-video-link-form .stanloop-field {
    margin: 0;
}

.stanloop-video-link-upload-field__label {
    display: block;
    margin-bottom: 8px;
    color: #172033;
    font-weight: 800;
}

.stanloop-video-link-upload {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 14px;
    border: 1.5px dashed #B8C0CC;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFCF4 100%);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.stanloop-video-link-upload:hover,
.stanloop-video-link-upload:focus-within {
    border-color: #17233A;
    background: #F3F6FA;
    box-shadow: 0 8px 22px rgba(23, 35, 58, .11);
    transform: translateY(-1px);
}

.stanloop-video-link-upload.has-file {
    border-style: solid;
    border-color: #34455F;
    background: #F3F6FA;
}

.stanloop-video-link-upload__input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.stanloop-video-link-upload__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #17233A;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(23, 35, 58, .18);
}

.stanloop-video-link-upload__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    color: #233044;
}

.stanloop-video-link-upload__copy strong {
    color: #17233A;
    font-size: 14px;
}

.stanloop-video-link-upload__copy small {
    color: #6b7280;
    font-size: 12px;
}

.stanloop-video-link-upload__filename {
    max-width: 250px;
    padding: 7px 10px;
    border: 1px solid #E5E8EC;
    border-radius: 9px;
    background: #fff;
    color: #647067;
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stanloop-video-link-upload.has-file .stanloop-video-link-upload__filename {
    border-color: #B8C0CC;
    color: #17233A;
    font-weight: 750;
}

.stanloop-video-link-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.stanloop-video-link-form__submit,
.stanloop-video-link-form__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.stanloop-video-link-form__submit {
    border: 1px solid #17233A;
    background: #17233A;
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 35, 58, .17);
    cursor: pointer;
}

.stanloop-video-link-form__submit:hover,
.stanloop-video-link-form__submit:focus {
    border-color: #17233A;
    background: #17233A;
    color: #fff;
    transform: translateY(-1px);
}

.stanloop-video-link-form__cancel {
    border: 1px solid #E5E8EC;
    background: #FFFCF4;
    color: #17233A;
}

.stanloop-video-link-form__cancel:hover,
.stanloop-video-link-form__cancel:focus {
    border-color: #B8C0CC;
    background: #F3F6FA;
    color: #17233A;
    text-decoration: none;
    transform: translateY(-1px);
}

@media (max-width: 700px) {
    .stanloop-video-card__mentioned-link,
    .stanloop-video-card--format-short-reel .stanloop-video-card__mentioned-link {
        align-self: stretch;
        width: 100%;
    }

    .stanloop-video-card__utility-button,
    .stanloop-video-card__save-wrap .stanloop-button {
        padding-inline: 6px;
        font-size: 10.5px !important;
    }

    .stanloop-video-link-upload {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .stanloop-video-link-upload__filename {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
    }

    .stanloop-video-link-form__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .stanloop-video-link-form__submit,
    .stanloop-video-link-form__cancel {
        width: 100%;
    }
}

/* v0.2.07 Mentioned Links compact heading and centred card actions */
.stanloop-video-links__header {
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.stanloop-video-links__heading-copy {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.stanloop-video-links__header h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.15;
}

.stanloop-video-links__header p {
    margin: 0;
    color: #647067;
    font-size: 12.5px;
    line-height: 1.35;
}

.stanloop-video-links__add-button {
    box-sizing: border-box;
    position: relative;
    top: -2px;
    min-height: 36px;
    padding: 8px 13px;
}

.stanloop-video-links__filters {
    margin-top: 0;
    margin-bottom: 14px;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__mentioned-link,
.stanloop-video-card__mentioned-link {
    box-sizing: border-box;
    align-self: center;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 9px 16px;
}

.stanloop-video-card__utility-row,
.stanloop-video-card__utility-row--count-2,
.stanloop-video-card__utility-row--count-3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.stanloop-video-card__description-control,
.stanloop-video-card__save-wrap,
.stanloop-video-card__edit-button,
.stanloop-video-card__share-button {
    box-sizing: border-box;
    flex: 1 1 88px;
    width: auto;
    min-width: 0;
    max-width: 112px;
}

.stanloop-video-card__save-wrap,
.stanloop-video-card__save-wrap .stanloop-save-form {
    margin: 0;
}

.stanloop-video-card__utility-button,
.stanloop-video-card__save-wrap .stanloop-button {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px !important;
    line-height: 1.1;
}

@media (max-width: 700px) {
    .stanloop-video-links__header {
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 7px;
    }

    .stanloop-video-links__heading-copy {
        gap: 3px 8px;
    }

    .stanloop-video-links__header h2 {
        font-size: 22px;
    }

    .stanloop-video-links__header p {
        flex-basis: 100%;
        font-size: 12px;
    }

    .stanloop-video-links__add-button {
        top: -1px;
        min-width: 0;
        min-height: 34px;
        padding: 7px 11px;
    }

    .stanloop-video-links__filters {
        margin-bottom: 12px;
    }

    .stanloop-video-card--format-short-reel .stanloop-video-card__mentioned-link,
    .stanloop-video-card__mentioned-link {
        align-self: center;
        width: auto;
        max-width: 100%;
    }

    .stanloop-video-card__description-control,
    .stanloop-video-card__save-wrap,
    .stanloop-video-card__edit-button,
    .stanloop-video-card__share-button {
        flex-basis: 84px;
        width: auto;
        max-width: 108px;
    }

    .stanloop-video-card__utility-button,
    .stanloop-video-card__save-wrap .stanloop-button {
        width: 100% !important;
        padding-inline: 7px;
        font-size: 10.5px !important;
    }
}


/* v0.2.20 — land saved Mentioned Links on the exact card beneath sticky chrome. */
.stanloop-video-card[id^="stanloop-mentioned-link-"] {
    scroll-margin-top: 150px;
}

.stanloop-video-card[id^="stanloop-mentioned-link-"]:target {
    border-color: #34455F;
    box-shadow: 0 0 0 3px rgba(23, 35, 58, .14), 0 14px 32px rgba(23, 35, 58, .12);
}

/* Covozi Core v0.1.17 — connected Instagram Mentioned Links import. */
.stanloop-video-link-source-field {
    display: grid;
    gap: 8px;
}

.stanloop-video-link-source-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
}

.stanloop-video-link-source-row > input[type="url"] {
    min-width: 0;
}

.stanloop-instagram-fetch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 188px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid #C64F46;
    border-radius: 10px;
    background: #C64F46;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(198, 79, 70, .16);
    transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}

.stanloop-instagram-fetch-button:hover,
.stanloop-instagram-fetch-button:focus {
    background: #AB4038;
    border-color: #AB4038;
    color: #fff;
    transform: translateY(-1px);
}

.stanloop-instagram-fetch-button:disabled,
.stanloop-instagram-fetch-button[aria-disabled="true"] {
    border-color: #D8DDD9;
    background: #EFF2F0;
    color: #7B847E;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.stanloop-instagram-fetch-button__spinner {
    display: none;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid rgba(255, 255, 255, .46);
    border-top-color: #fff;
    border-radius: 50%;
    animation: stanloop-instagram-import-spin .72s linear infinite;
}

.stanloop-instagram-fetch-button.is-loading .stanloop-instagram-fetch-button__spinner {
    display: inline-block;
}

@keyframes stanloop-instagram-import-spin {
    to { transform: rotate(360deg); }
}

.stanloop-field-help--connection {
    color: #17233A;
    font-weight: 700;
}

.stanloop-instagram-import-status {
    padding: 10px 12px;
    border: 1px solid #D8E2DC;
    border-radius: 10px;
    background: #F7F9F8;
    color: #4B5850;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.stanloop-instagram-import-status.is-loading {
    border-color: #C7DDD2;
    background: #F0F7F3;
    color: #17233A;
}

.stanloop-instagram-import-status.is-success {
    border-color: #9BC7AE;
    background: #EAF4EE;
    color: #174B38;
}

.stanloop-instagram-import-status.is-error {
    border-color: #E7B9B4;
    background: #FFF3F1;
    color: #8A342D;
}

.stanloop-instagram-import-preview {
    display: none;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 12px;
    border: 1px solid #C7DDD2;
    border-radius: 14px;
    background: linear-gradient(135deg, #F5FAF7 0%, #FFF9F6 100%);
}

.stanloop-instagram-import-preview.is-visible {
    display: grid;
}

.stanloop-instagram-import-preview__media {
    position: relative;
    min-height: 128px;
    overflow: hidden;
    border-radius: 11px;
    background: #DDE9E2;
}

.stanloop-instagram-import-preview__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 128px;
    object-fit: cover;
}

.stanloop-instagram-import-preview__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 128px;
    color: #17233A;
    font-size: 36px;
    font-weight: 800;
}

.stanloop-instagram-import-preview__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.stanloop-instagram-import-preview__eyebrow {
    color: #17233A;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stanloop-instagram-import-preview__body > strong {
    color: #172033;
    font-size: 16px;
    line-height: 1.3;
}

.stanloop-instagram-import-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    color: #526058;
    font-size: 11px;
    font-weight: 750;
}

.stanloop-instagram-import-preview__meta > span:empty {
    display: none;
}

.stanloop-instagram-import-preview__body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #445047;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

@media (max-width: 700px) {
    .stanloop-video-link-source-row {
        grid-template-columns: 1fr;
    }

    .stanloop-instagram-fetch-button {
        width: 100%;
        min-width: 0;
    }

    .stanloop-instagram-import-preview {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 11px;
    }

    .stanloop-instagram-import-preview__media,
    .stanloop-instagram-import-preview__media img,
    .stanloop-instagram-import-preview__placeholder {
        min-height: 108px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stanloop-instagram-fetch-button,
    .stanloop-instagram-fetch-button__spinner {
        transition: none;
        animation-duration: 1.5s;
    }
}

/* Automatic Instagram Mentioned Link drafts. */
.stanloop-instagram-auto-drafts {
    display: grid;
    gap: 16px;
    margin: 0 0 24px;
    padding: clamp(18px, 2.2vw, 26px);
    border: 1px solid #cfe3d9;
    border-radius: 18px;
    background: linear-gradient(135deg, #f5fbf7 0%, #ffffff 58%, #fff8f3 100%);
    box-shadow: 0 14px 34px rgba(32, 92, 67, .07);
}

.stanloop-instagram-auto-drafts__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.stanloop-instagram-auto-drafts__heading h3,
.stanloop-instagram-auto-drafts__queue-heading h4 {
    margin: 3px 0 5px;
    color: #14231e;
}

.stanloop-instagram-auto-drafts__heading p {
    max-width: 780px;
    margin: 0;
    color: #4d5d55;
    line-height: 1.55;
}

.stanloop-instagram-auto-drafts__eyebrow {
    color: #17233A;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.stanloop-instagram-auto-drafts__status {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2ef;
    color: #55635c;
    font-size: 11px;
    font-weight: 850;
}

.stanloop-instagram-auto-drafts__status.is-enabled {
    background: #dff3e8;
    color: #176344;
}

.stanloop-instagram-auto-drafts__rule {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d9e9e0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
    color: #405148;
    font-size: 13px;
    line-height: 1.45;
}

.stanloop-instagram-auto-drafts__rule.is-warning {
    border-color: #efd7c5;
    background: #fff8f1;
    color: #7d4a2b;
}

.stanloop-instagram-auto-drafts__toggle {
    margin: 0;
}

.stanloop-instagram-auto-drafts__toggle button,
.stanloop-instagram-auto-draft-card__actions a,
.stanloop-video-link-form__save-draft,
.stanloop-video-link-form__reject {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #b8d8c8;
    border-radius: 10px;
    background: #fff;
    color: #236b4f;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.stanloop-instagram-auto-drafts__toggle button.is-enable,
.stanloop-instagram-auto-draft-card__actions a.is-primary {
    border-color: #17233A;
    background: #17233A;
    color: #fff;
}

.stanloop-instagram-auto-drafts__toggle button.is-disable,
.stanloop-video-link-form__reject {
    border-color: #edc0b8;
    color: #a13f34;
}

.stanloop-instagram-auto-drafts__toggle button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.stanloop-instagram-auto-drafts__queue {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.stanloop-instagram-auto-drafts__queue-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stanloop-instagram-auto-drafts__queue-heading h4 {
    font-size: 17px;
}

.stanloop-instagram-auto-drafts__queue-heading span {
    color: #68766f;
    font-size: 12px;
    font-weight: 750;
}

.stanloop-instagram-auto-draft-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 12px;
    border: 1px solid #d6e7dd;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
}

.stanloop-instagram-auto-draft-card > img,
.stanloop-instagram-auto-draft-card__placeholder {
    width: 92px;
    height: 112px;
    border-radius: 10px;
    object-fit: cover;
    background: #e4f0ea;
}

.stanloop-instagram-auto-draft-card__placeholder {
    display: grid;
    place-items: center;
    color: #17233A;
    font-size: 30px;
    font-weight: 800;
}

.stanloop-instagram-auto-draft-card > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.stanloop-instagram-auto-draft-card__state {
    color: #b14c3e;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.stanloop-instagram-auto-draft-card strong {
    overflow-wrap: anywhere;
    color: #18241f;
    font-size: 15px;
}

.stanloop-instagram-auto-draft-card small {
    color: #69766f;
}

.stanloop-instagram-auto-draft-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.stanloop-instagram-auto-draft-card__actions a {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
}

.stanloop-instagram-auto-drafts__rejected {
    border-top: 1px solid #d9e6df;
    padding-top: 12px;
    color: #526159;
}

.stanloop-instagram-auto-drafts__rejected summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.stanloop-instagram-auto-drafts__rejected p {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .76);
}

.stanloop-instagram-draft-review-note {
    margin: 0 0 16px;
    padding: 13px 15px;
    border: 1px solid #efd8c8;
    border-radius: 12px;
    background: #fff8f2;
    color: #654637;
    line-height: 1.5;
}

.stanloop-video-link-form__save-draft,
.stanloop-video-link-form__reject {
    gap: 6px;
}

@media (max-width: 700px) {
    .stanloop-instagram-auto-drafts__heading,
    .stanloop-instagram-auto-drafts__queue-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stanloop-instagram-auto-drafts__status {
        align-self: flex-start;
    }

    .stanloop-instagram-auto-draft-card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 11px;
    }

    .stanloop-instagram-auto-draft-card > img,
    .stanloop-instagram-auto-draft-card__placeholder {
        width: 78px;
        height: 98px;
    }

    .stanloop-instagram-auto-drafts__toggle button,
    .stanloop-instagram-auto-draft-card__actions a,
    .stanloop-video-link-form__save-draft,
    .stanloop-video-link-form__reject {
        width: 100%;
    }
}

/* -------------------------------------------------------------------------
 * v1.29 — Full-width-safe Shorts/Reels portrait geometry.
 * A later v0.2.03 redesign expanded Shorts cards to fractional desktop grid
 * columns and capped media at 420px. On wide monitors the card widened while
 * the height stopped, visually flattening a 9:16 Reel toward a square. Keep
 * portrait media tied to the card, not to the available page width.
 * ---------------------------------------------------------------------- */
.stanloop-video-links__grid--filter-shorts {
    grid-template-columns: repeat(auto-fill, minmax(240px, 320px)) !important;
    justify-content: start !important;
    align-items: start !important;
}

.stanloop-video-card--format-short-reel {
    width: 100% !important;
    max-width: 320px !important;
    justify-self: start !important;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__media {
    width: 100% !important;
    aspect-ratio: 9 / 16 !important;
    max-height: none !important;
}

.stanloop-video-card--format-short-reel .stanloop-video-card__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

@media (max-width: 700px) {
    .stanloop-video-links__grid--filter-shorts {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .stanloop-video-card--format-short-reel {
        width: min(100%, 320px) !important;
        max-width: 320px !important;
        justify-self: center !important;
    }
}
