/* Built-in Overlay System Styles */

/* Main Overlay Container */
.builtin-overlay {
    position: fixed;
    top: 30%; /* Position 30% from top of viewport */
    left: 50%; /* Center horizontally */
    width: 80%;
    max-width: 1800px;
    height: auto; /* Auto height to fit content */
    min-height: 380px; /* Minimum height to fit all initial controls */
    transform: translate(-50%, -50%); /* Center both horizontally and vertically from the 50% position */
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 12px;
    padding: 10px;
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 0px;
    box-sizing: border-box;
    z-index: 2147483000;
}

/* Overlay Header */
.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    flex-shrink: 0;
    margin-bottom: 24px;
}

.overlay-title {
    font-size: 20px;
    color: #6b7280;
    font-weight: 700;
    align-self: flex-start;
    width: 120px;
    text-align: center;
}

.overlay-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.overlay-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Overlay Content */
.overlay-content {
    flex: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.overlay-body {
    flex: 1;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 18px;
    padding-right: 8px;
}


/* Overlay Resizer Handle */
.overlay-resizer {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
    opacity: 0.9;
    border-right: 2px solid #fbbf24;
    border-bottom: 2px solid #fbbf24;
    border-radius: 2px;
    touch-action: none;
}

.overlay-resizer:hover {
    opacity: 1;
}
