/* ══════════════════════════════════════
   Glance Browser Frame
   Full-view iframe with breadcrumb bar.
   Include in any Glance view to make
   external links open in-frame.
   ══════════════════════════════════════ */

.glance-frame-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg, #fff);
    display: none;
    flex-direction: column;
    animation: frameSlideIn 0.25s ease-out;
}

.glance-frame-overlay.open {
    display: flex;
}

.glance-frame-overlay.closing {
    animation: frameSlideOut 0.2s ease-in forwards;
}

.glance-frame-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 44px;
    background: var(--card, #fff);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
    flex-shrink: 0;
    z-index: 1;
}

.glance-frame-bar .frame-back {
    background: none;
    border: 1px solid var(--border, rgba(0,0,0,0.08));
    color: var(--text2, #666);
    font-family: 'Geist', sans-serif;
    font-size: 0.72em;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.glance-frame-bar .frame-back:hover {
    color: var(--text, #171717);
    border-color: rgba(0,0,0,0.15);
    background: var(--surface, #fafafa);
}

.glance-frame-bar .frame-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.1em;
    color: var(--text3, #999);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s;
}

.glance-frame-bar .frame-close:hover {
    color: var(--red, #e5484d);
}

.glance-frame-bar .frame-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72em;
    color: var(--text3, #999);
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.glance-frame-bar .frame-breadcrumb span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glance-frame-bar .frame-breadcrumb .crumb-link {
    color: var(--accent, #0070f3);
    cursor: pointer;
    font-weight: 500;
}

.glance-frame-bar .frame-breadcrumb .crumb-link:hover {
    text-decoration: underline;
}

.glance-frame-bar .frame-breadcrumb .crumb-sep {
    color: var(--text3, #999);
    flex-shrink: 0;
}

.glance-frame-bar .frame-title {
    font-weight: 600;
    font-size: 0.78em;
    color: var(--text, #171717);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glance-frame-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--bg, #fff);
}

@keyframes frameSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes frameSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(8px); }
}

/* Mobile: full-width, swipe-friendly close */
@media (max-width: 768px) {
    .glance-frame-bar {
        height: 48px;
        padding: 0 12px;
    }
    .glance-frame-bar .frame-back {
        font-size: 0.78em;
        padding: 6px 14px;
    }
    .glance-frame-bar .frame-close {
        font-size: 1.3em;
        padding: 6px 10px;
    }
}