/* ============================================
   AR / "Preview in Your Space" — custom styles
   Kept separate from banner-designer.css to
   avoid any risk of breaking existing editor styles.
   ============================================ */

/* ---------- Top banner button (header-right, next to size selector) ---------- */
.bd-ar-top-banner-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #f0f7ff;
    border: 1.5px solid #0084ff;
    border-radius: 10px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
}

.bd-ar-top-banner-btn:hover {
    background: #e5f2ff;
    box-shadow: 0 2px 8px rgba(0, 132, 255, 0.15);
}

.bd-ar-top-banner-btn:active {
    background: #d6eaff;
}

.bd-ar-top-banner-btn .bd-ar-title {
    font-weight: 700;
    font-size: 13px;
    color: #0073e6;
}

.bd-ar-top-banner-btn .bd-ar-sparkles {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.bd-ar-top-banner-btn .bd-ar-subtitle {
    font-weight: 400;
    font-size: 10px;
    color: #668099;
    display: block;
    line-height: 1.2;
}

.bd-ar-top-banner-btn .bd-ar-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

/* Mobile phone icon inside the AR button */
.bd-ar-mobile-icon {
    flex-shrink: 0;
    display: block;
}

/* ---------- Footer AR button (replaces plain "View in AR") ---------- */
#bd-ar-preview-btn.bd-ar-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#bd-ar-preview-btn.bd-ar-footer-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   TOP HEADER OVERRIDES
   Fix layout so the right group (size selector +
   AR button + Invite Designer) stays in one row
   and never wraps, even when the text formatting
   toolbar appears in the center.
   ============================================ */

/* ---------- Header bar — 2-level right column layout ---------- */
.bd-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    min-height: 60px;            /* extra room for 2 rows on the right */
    flex-wrap: nowrap;
}

/* ---------- Right group — two-level column
   Row 1: size selector (full width)
   Row 2: .bd-header-right-buttons — AR button + Invite Designer (inline row) ---------- */
.bd-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Size selector — compact, right-aligned, never stretches full width */
.bd-header-right > #bd-size-select {
    width: auto !important;
    max-width: 200px !important;
    align-self: flex-end !important;
    flex-shrink: 0;
}

/* Bottom row wrapper — AR button + Invite Designer in one horizontal line */
.bd-header-right-buttons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

/* AR button + Invite Designer — no extra width/margin, inline in the row */
.bd-header-right-buttons .bd-ar-top-banner-btn,
.bd-header-right-buttons .bd-invite-designer-wrap {
    display: inline-flex !important;
    align-items: center;
    vertical-align: middle;
    width: auto !important;
    margin: 0 !important;
    flex-shrink: 0;
}

/* ---------- Left group — column layout to save horizontal space ---------- */
.bd-header-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}

/* History buttons (undo/redo/revert) row */
.bd-history-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Import PSD wrapper — compact */
.bd-import-btn-wrap {
    width: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bd-import-btn-wrap .bd-divider {
    align-self: stretch;
}

/* ---------- Font picker — ensure minimum width so it's usable ---------- */
.bd-font-picker-trigger,
#bd-font-picker-trigger,
.bd-select.bd-font-picker-trigger {
    min-width: 130px !important;
    width: auto !important;
}

/* Size selector — compact */
#bd-size-select {
    max-width: 180px !important;
}

/* ---------- Center toolbar — scroll instead of clip ---------- */
.bd-header-center {
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.bd-header-center .bd-toolbar-group {
    flex-wrap: nowrap;
}
