﻿
/* ================================
   WCO integration
   ================================ */

:root {
    --titlebar-height: env(titlebar-area-height, 32px);
    --tab-height: 32px;
}

body {
    margin: 0;
    padding-top: env(titlebar-area-height, 0);
}


/* ================================
   Title Bar Container
   ================================ */

.app-titlebar {
    height: env(titlebar-area-height, 32px);
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    position: fixed;
    align-items: center;
    color: white;
    padding-left: env(titlebar-area-left, 0px);
    padding-right: env(titlebar-area-right, 100%);
    background: rgba(32,32,32,0.85);
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--fluent-border);
    /* Drag region */
    -webkit-app-region: drag;
    user-select: none;
    z-index: 2000;
}

.titlebar-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.tab {
    height: var(--tab-height);
    padding: 0 14px;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: none;
    font-size: 13px;
    cursor: pointer;
    -webkit-app-region: no-drag;
}

    /* Hover */
    .tab:hover {
        background: rgba(255,255,255,0.08);
    }

    /* Active tab */
    .tab.active {
        background: rgba(255,255,255,0.14);
        color: white;
    }

/* New tab button */
.new-tab {
    font-size: 16px;
    padding: 0 10px;
}

/* Main content */
.app-content {
    padding: 2px;
}


.left {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Disable blur if unsupported */
@supports not (backdrop-filter: blur(1px)) {
    .app-titlebar {
        background: var(--fluent-bg-fallback);
    }
}

/* ================================
   Title / App name
   ================================ */

.app-titlebar .title {
    font-size: 12.5px;
    font-weight: 500;
    opacity: 0.9;
    white-space: nowrap;
}

/* ================================
   Action buttons (non-drag)
   ================================ */

.app-titlebar button {
    -webkit-app-region: no-drag;
    background: transparent;
    border: none;
    color: inherit;
    padding: 6px;
    border-radius: 4px;
}

    .app-titlebar button:hover {
        background: rgba(255, 255, 255, 0.1);
    }

button,
input,
a {
    -webkit-app-region: no-drag;
}

.no-overlay.app-titlebar {
    height: 48px;
}

.app-titlebar .wco {
    --titlebar-height: env(titlebar-area-height, 32px);
}

@media (prefers-color-scheme: light) {
    .app-titlebar button:hover {
        background: rgba(0, 0, 0, 0.08);
    }
}

.no-drag {
    -webkit-app-region: no-drag;
}
