.fab-ig-index,
.fab-ig-page {
    --fab-ig-accent: var(--fab-bunt1, #8a8b68);
    --fab-ig-dark: var(--fab-bunt2, #373729);
    --fab-ig-soft: var(--fab-bunt3, #979878);
    --fab-ig-light: var(--fab-schrift2, #ebebea);
    color: var(--fab-ig-dark);
}

/* FABEGRAM START */
.fab_fg_container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 1000px;
    margin: 20px auto;
    flex-wrap: wrap;
    gap: 40px;
    align-items: stretch; 
}

.fab_fg_ue {
    font-family: var(--fab_mainfont);
    font-size: 40px;
    color: var(--fab_bunt1);
    text-align: center;
    margin: 20px auto 30px;
}

.fab_fg_text {
    width: 60%;
    margin:auto;
}

.fab_fg_bearbeiten {
    margin: 20px 0px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.fab_fg_bearbeiten i {
    font-size: 25px;
    color: var(--fab_bunt1);
}

.fab_fg_bearbeiten i:hover {
    color: var(--fab_border_hell);
}

.fab_fg_beitrag_container {
    width: 290px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    padding-top: 10px;
    box-sizing: border-box;
    border: 2px solid var(--fab_bg_hell);
}

.fab_fg_beitrag {
    margin-top: 0; 
    cursor: pointer;
    margin-top: 10px;
    position: relative;
}

.fab_fg_beitrag img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    display: block;
    transition: opacity 0.2s ease;
    margin-bottom: 10px;
}

.fab_fg_beitrag img:hover {
    opacity: 0.95;
}

#fab_fg_lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

#fab_fg_lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

#fab_fg_lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.fab_fb_top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0px 5px 10px 5px;
}

.fab_fb_top::after, .fab_fg_beitrag::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right, 
        transparent 0%, 
        var(--fab_border_hell) 20%, 
        var(--fab_border_hell) 80%, 
        transparent 100%
    );
}

.fab_fg_bild img {
    border-radius: 50%;
    border: 3px solid transparent;
    background: 
        linear-gradient(#fff, #fff) padding-box, 
        linear-gradient(135deg, var(--fab_bunt1), var(--fab_bunt2)) border-box;
    object-fit: cover;
    width: 60px;
    height: 60px;
}

.fab_fg_name {
    font-weight: bold;
}

.fab_fg_name i {
    color: var(--fab_bunt1);
    font-size: 15px;
}

.fab_fg_ut {
    height: 60px;
    overflow: auto;
    padding-right: 5px;
}

.fab_fg_name_ut {
    padding-left: 5px;
}

.fab_fg_hashtags {
    margin-top: 5px;
    color: var(--fab_bunt1);
    padding: 0px 5px;
}

/* HIER STARTET DAS REACTION DINGENS */
.fab_fg_herz {
    text-align: center;
    font-size: 20px;
    margin-top: 5px;
}

/* DIE SCHNUCKELIGEN ICONS */
.fab_fg_action_icons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
    font-size: 13px;
    z-index: 2;
}

.fab_fg_action_icons a {
    color: var(--fab_border_hell);
    transition: color 0.2s ease;
}

.fab_fg_action_icons a:hover {
    color: var(--fab_bunt1);
}

/* Technische Verbindung der unveränderten Gestaltung mit den Plugin-Aktionen. */
.fab_fg_bearbeiten a {
    line-height: 1;
}

.fab_fg_name a {
    color: inherit;
}

.fab_fg_action_icons form {
    margin: 0;
}

.fab_fg_action_icons button,
.fab_fg_herz .fab-ig-like {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fab_border_hell);
    font: inherit;
    cursor: pointer;
}

.fab_fg_action_icons button:hover,
.fab_fg_herz .fab-ig-like:hover {
    color: var(--fab_bunt1);
}

.fab_fg_herz .fab-ig-like-cluster {
    justify-content: center;
}

.fab_fg_herz .fab-ig-like {
    --fa-primary-color: #4f4f4b;
    --fa-secondary-color: #4f4f4b;
    --fa-primary-opacity: 1;
    --fa-secondary-opacity: 1;
    color: #8b8b86;
}

.fab_fg_herz .fab-ig-like.is-liked {
    --fa-primary-color: #a64752;
    --fa-secondary-color: #a64752;
    color: #a64752;
}

.fab_fg_herz .fab-ig-like-count {
    color: var(--fab_bunt2);
}

.fab-ig-profile-feed-panel .fab_fg_container {
    max-width: 100%;
}

.fab-ig-index {
    width: 100%;
    margin: 18px auto;
    padding: 12px;
    border: 3px double rgba(255, 255, 255, .8);
}

.fab-ig-index h2,
.fab-ig-page h1 {
    margin: 0 0 12px;
    color: var(--fab-ig-accent);
    font-family: var(--fab-mainfont, "UnifrakturCook", serif);
    text-align: center;
}

.fab-ig-index-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.fab-ig-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .75);
}

.fab-ig-thumb-button,
.fab-ig-image-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.fab-ig-thumb {
    display: block;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
}

.fab-ig-card-copy {
    min-width: 0;
}

.fab-ig-card-copy p {
    display: -webkit-box;
    margin: 4px 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fab-ig-handle {
    font-weight: 700;
    text-transform: none;
}

.fab-ig-tags {
    overflow-wrap: anywhere;
    color: var(--fab-ig-accent);
}

.fab-ig-read,
.fab-ig-more {
    font-size: 11px;
}

.fab-ig-more {
    display: table;
    margin: 12px auto 0;
}

.fab-ig-page {
    width: min(920px, calc(100% - 30px));
    margin: 25px auto 60px;
}

.fab-ig-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.fab-ig-page-head h1 {
    margin: 0;
}

.fab-ig-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fab-ig-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}

.fab-ig-feed > div {
    height: 100%;
}

.fab-ig-post {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, .6);
    border: 1px solid var(--fab-ig-soft);
}

.fab-ig-post header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 78px;
    padding: 10px;
}

.fab-ig-post time {
    display: block;
    font-size: 11px;
    opacity: .75;
}

.fab-ig-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

.fab-ig-image-button,
.fab-ig-image {
    display: block;
    width: 100%;
}

.fab-ig-image {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.fab-ig-like-row {
    display: flex;
    align-items: center;
    min-height: 35px;
    padding: 6px 10px 0;
}

.fab-ig-like {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fab-ig-dark);
    cursor: pointer;
}

.fab-ig-heart {
    width: 25px;
    height: 24px;
    overflow: visible;
    fill: #8b8b86;
    stroke: #242422;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: fill .15s ease, transform .15s ease;
}

.fab-ig-like:hover .fab-ig-heart,
.fab-ig-like:focus-visible .fab-ig-heart {
    transform: scale(1.1);
}

.fab-ig-like.is-liked .fab-ig-heart {
    fill: #a64752;
    stroke: #242422;
}

.fab-ig-like-cluster {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fab-ig-like-summary {
    position: relative;
    display: inline-flex;
    padding: 3px 4px;
    border-radius: 8px;
    cursor: help;
}

.fab-ig-like-summary::after {
    position: absolute;
    top: 0;
    left: 100%;
    width: 10px;
    height: 100%;
    content: "";
}

.fab-ig-like-count {
    min-width: 1ch;
    font-size: 12px;
}

.fab-ig-likers {
    position: absolute;
    z-index: 20;
    top: 2px;
    left: calc(100% + 8px);
    display: none;
    width: 210px;
    min-width: 150px;
    max-width: min(240px, 60vw);
    max-height: 230px;
    overflow-y: auto;
    padding: 9px 11px;
    border: 1px solid var(--fab-ig-soft);
    border-radius: 10px;
    background: #fffdf6;
    box-shadow: 0 5px 18px rgba(36, 32, 22, .18);
    color: var(--fab-ig-dark);
    font-size: 12px;
    line-height: 1.5;
}

.fab-ig-likers strong,
.fab-ig-likers a,
.fab-ig-likers > span {
    display: block;
}

.fab-ig-likers a {
    color: #7c2d32;
}

.fab-ig-like-summary:hover .fab-ig-likers,
.fab-ig-like-summary:focus .fab-ig-likers,
.fab-ig-like-summary:focus-within .fab-ig-likers,
.fab-ig-likers:hover {
    display: block;
}

.fab-ig-like:disabled {
    cursor: wait;
    opacity: .55;
}

.fab-ig-caption,
.fab-ig-post > .fab-ig-tags {
    padding: 10px;
}

.fab-ig-caption {
    flex: 1 1 auto;
    min-height: 58px;
}

.fab-ig-post > .fab-ig-tags {
    min-height: 31px;
    padding-top: 0;
}

.fab-ig-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    font-size: 11px;
}

.fab-ig-controls form {
    margin: 0;
}

.fab-ig-controls button {
    padding: 0;
    border: 0;
    background: none;
    color: #8b1e1e;
    cursor: pointer;
}

.fab-ig-button {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid var(--fab-ig-soft);
    background: var(--fab-ig-accent);
    color: var(--fab-ig-dark);
    cursor: pointer;
}

.fab-ig-button-muted {
    background: transparent;
}

.fab-ig-form-page {
    max-width: 700px;
}

.fab-ig-form-page form {
    padding: 20px;
    background: rgba(255, 255, 255, .55);
    border: 1px solid var(--fab-ig-soft);
}

.fab-ig-form-page label {
    display: block;
    margin-bottom: 16px;
    font-weight: 700;
}

.fab-ig-form-page input[type="text"],
.fab-ig-form-page input[type="file"],
.fab-ig-form-page textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px;
    border: 1px solid var(--fab-ig-soft);
    background: rgba(255, 255, 255, .85);
    color: #111;
    font: inherit;
}

.fab-ig-current-image {
    display: block;
    max-width: 240px;
    max-height: 240px;
    margin: 0 0 15px;
    object-fit: contain;
}

.fab-ig-current {
    display: block;
    margin-bottom: 15px;
}

.fab-ig-current-banner {
    display: block;
    width: min(100%, 600px);
    aspect-ratio: 10 / 3;
    margin-bottom: 15px;
    object-fit: cover;
}

.fab-ig-color-fields {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.fab-ig-color-fields input[type="color"] {
    display: block;
    width: 80px;
    height: 42px;
    margin-top: 6px;
}

.fab-ig-profile {
    --fab-profile-accent: #7c2d32;
    --fab-profile-ring: #f4efe3;
    --fab-profile-background: #f4efe3;
}

.fab-ig-profile-hero {
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid var(--fab-ig-soft);
    border-radius: 14px 14px 0 0;
    background: var(--fab-profile-background);
    box-shadow: 0 8px 24px rgba(48, 47, 36, .08);
}

.fab-ig-profile-banner {
    display: block;
    width: 100%;
    aspect-ratio: 10 / 3;
    object-fit: cover;
}

.fab-ig-profile-banner-empty {
    background:
        radial-gradient(circle at 20% 40%, rgba(255,255,255,.55) 0 3px, transparent 4px),
        linear-gradient(135deg, var(--fab-profile-accent), var(--fab-profile-background));
    opacity: .72;
}

.fab-ig-profile-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 0 24px 0 28px;
}

.fab-ig-profile-identity h1 {
    margin: 4px 0 0;
    color: var(--fab-profile-accent);
    text-align: left;
}

.fab-ig-profile-identity .fab-ig-button {
    margin-left: auto;
    padding: 9px 16px;
    border-color: #77776f;
    border-radius: 18px;
    background: #85857d;
    color: #fffdf6 !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none !important;
}

.fab-ig-profile-identity .fab-ig-button:hover,
.fab-ig-profile-identity .fab-ig-button:focus-visible {
    background: #6f6f68;
    filter: none;
}

.fab-ig-profile-avatar {
    width: 116px;
    height: 116px;
    margin-top: -54px;
    border: 3px solid var(--fab-profile-ring);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 12px rgba(37, 37, 28, .15);
    object-fit: cover;
}

.fab-ig-profile-tagline {
    margin: 3px 0 0;
}

.fab-ig-profile-bio {
    max-width: 760px;
    padding: 12px 28px 16px;
    line-height: 1.65;
}

.fab-ig-profile-stats {
    display: flex;
    gap: 28px;
    padding: 14px 28px;
    border-top: 1px solid var(--fab-profile-accent);
    color: var(--fab-profile-accent);
}

.fab-ig-profile-stats strong {
    font-size: 15px;
}

.fab-ig-profile-feed-title {
    margin: 0 0 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--fab-profile-accent);
    color: var(--fab-profile-accent);
    font-family: inherit;
    font-size: 13px;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.fab-ig-profile-feed-title::before {
    margin-right: 7px;
    content: "▦";
}

.fab-ig-profile-feed-panel {
    margin-top: -1px;
    padding: 18px;
    border: 1px solid var(--fab-profile-accent);
    border-radius: 0 0 14px 14px;
    background: var(--fab-profile-background);
    box-shadow: 0 8px 24px rgba(48, 47, 36, .07);
}

.fab-ig-profile .fab-ig-post {
    border-color: rgba(79, 91, 59, .45);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 4px 14px rgba(48, 47, 36, .07);
    transition: box-shadow .18s ease, transform .18s ease;
}

.fab-ig-profile .fab-ig-post:hover {
    box-shadow: 0 8px 20px rgba(48, 47, 36, .12);
    transform: translateY(-2px);
}

.fab-ig-profile .fab-ig-post header {
    min-height: 70px;
}

.fab-ig-profile .fab-ig-handle {
    color: var(--fab-profile-accent);
}

.fab-ig-banner-editor[hidden] {
    display: none;
}

.fab-ig-banner-editor {
    margin: 10px 0 18px;
    padding: 14px;
    border: 1px solid var(--fab-ig-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, .55);
}

.fab-ig-banner-crop {
    position: relative;
    width: 100%;
    aspect-ratio: 10 / 3;
    overflow: hidden;
    border: 1px solid var(--fab-ig-soft);
    background: #ddd;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.fab-ig-banner-crop.is-dragging {
    cursor: grabbing;
}

.fab-ig-banner-crop img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    object-fit: cover;
    transform-origin: center;
}

.fab-ig-banner-editor input[type="range"] {
    width: min(100%, 420px);
}

.fab-ig-help,
.fab-ig-notice,
.fab-ig-empty {
    padding: 10px;
    border: 1px solid var(--fab-ig-soft);
}

.fab-ig-errors {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #9f3030;
    background: #f8dddd;
    color: #621414;
}

.fab-ig-lightbox[hidden] {
    display: none;
}

.fab-ig-lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 40px;
    background: rgba(0, 0, 0, .86);
}

.fab-ig-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
}

.fab-ig-lightbox-close {
    position: fixed;
    top: 15px;
    right: 24px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
}

@media (max-width: 850px) {
    .fab-ig-index-grid,
    .fab-ig-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .fab-ig-index-grid,
    .fab-ig-feed {
        grid-template-columns: 1fr;
    }

    .fab-ig-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .fab-ig-profile-identity {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 0 15px;
    }

    .fab-ig-profile-avatar {
        width: 86px;
        height: 86px;
    }

    .fab-ig-profile-identity .fab-ig-button {
        width: 100%;
        margin: 0 0 10px;
        text-align: center;
    }

    .fab-ig-profile-bio,
    .fab-ig-profile-stats {
        padding-right: 15px;
        padding-left: 15px;
    }
}
