/*
 * Bannerframe – Bannerseite
 *
 * Farben kommen aus dem Theme; die Akzentfarbe aus --accent.
 */

.bf {
    --bf-line: rgba(128, 128, 128, .28);
    --bf-soft: rgba(128, 128, 128, .08);
    --bf-accent: var(--accent, var(--rs-accent, #2563eb));

    color: inherit;
    font-size: 15px;
    line-height: 1.55;
}

.bf * { box-sizing: border-box; }

.bf-intro { margin: 0 0 18px; }

.bf-empty {
    padding: 18px;
    border: 1px dashed var(--bf-line);
    border-radius: 12px;
    opacity: .85;
}

.bf-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.bf-cols-2 .bf-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.bf-item {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--bf-line);
    border-radius: 14px;
    background: var(--bf-soft);
    scroll-margin-top: 90px;
}

.bf-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 14px;
    margin-bottom: 10px;
}

.bf-title { margin: 0; font-size: 1.1em; color: inherit; }
.bf-size { font-size: .85em; font-weight: 600; opacity: .7; }
.bf-desc { margin: -4px 0 12px; opacity: .85; }

/* Schachbrett hinter dem Banner: durchsichtige Stellen bleiben sichtbar */
.bf-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: repeating-conic-gradient(rgba(128, 128, 128, .14) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
    overflow: hidden;
}

.bf-preview img { display: block; max-width: 100%; height: auto; }

.bf-codes { display: flex; flex-direction: column; gap: 12px; }

.bf-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.bf-code-head label { font-size: .9em; font-weight: 700; }

.bf .bf-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--bf-accent) !important;
    color: #fff !important;
    font: inherit;
    font-size: .85em;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.bf .bf-copy:hover { filter: brightness(1.08); }
.bf .bf-copy:focus-visible { outline: 3px solid rgba(128, 128, 128, .5); outline-offset: 2px; }
.bf .bf-copy.is-done { background: #16a34a !important; }

.bf-code textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bf-line);
    border-radius: 9px;
    background: rgba(128, 128, 128, .06);
    color: inherit;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    min-height: 0;
    resize: vertical;
    word-break: break-all;
    cursor: text;
}

.bf-code textarea:focus { outline: none; border-color: var(--bf-accent); }

@media (max-width: 760px) {
    .bf-cols-2 .bf-list { grid-template-columns: minmax(0, 1fr); }
    .bf-item { padding: 14px; }
}
