.branding-preview-widget {
    margin-top: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.branding-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.branding-preview-header strong {
    color: var(--text-primary, #fff);
    font-size: 0.95rem;
}

.branding-preview-template {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #94a3b8);
}

.branding-preview-frame {
    position: relative;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.branding-preview-frame.is-loading {
    cursor: wait;
}

.branding-preview-frame.is-loading img:not([hidden]) {
    opacity: 0.35;
}

.branding-preview-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 12px;
}

.branding-preview-loading[hidden] {
    display: none;
}

.branding-preview-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(49, 237, 243, 0.22);
    border-top-color: var(--primary-light, #31edf3);
    border-radius: 50%;
    animation: branding-preview-spin 0.8s linear infinite;
}

@keyframes branding-preview-spin {
    to { transform: rotate(360deg); }
}

.branding-preview-frame.is-landscape,
.branding-preview-frame[data-orientation="landscape"] {
    width: min(100%, 420px);
    aspect-ratio: 16 / 9;
}

.branding-preview-frame.is-portrait,
.branding-preview-frame[data-orientation="portrait"] {
    width: min(100%, 220px);
    aspect-ratio: 9 / 16;
}

.branding-preview-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}

.branding-preview-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}

.branding-preview-lightbox.is-open {
    display: flex;
}

.branding-preview-lightbox img {
    max-width: min(1280px, 92vw);
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.branding-preview-caption,
.branding-preview-edit,
.branding-preview-error {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.branding-preview-edit {
    display: inline-block;
    color: var(--primary-light, #31edf3);
    text-decoration: none;
}

.branding-preview-edit:hover {
    text-decoration: underline;
}

.branding-preview-widget.is-centered .branding-preview-caption,
.branding-preview-widget.is-centered .branding-preview-edit,
.branding-preview-widget.is-centered .branding-preview-error {
    text-align: center;
}

.branding-preview-widget.is-centered .branding-preview-edit {
    display: block;
}

.branding-preview-error {
    color: #f87171;
}

.branding-selection {
    margin-top: 18px;
}

.branding-selection > label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.photo-preview {
    width: 140px;
    height: 140px;
    border-radius: 50%;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.photo-actions,
.logo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.photo-remove-btn {
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fca5a5;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.9rem;
}

.photo-remove-btn:hover {
    background: rgba(248, 113, 113, 0.12);
}

.branding-preview-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.branding-preview-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.info-item.full-row {
    grid-column: 1 / -1;
}

.branding-toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
