@charset "UTF-8";

/* ============================================================
   PROTOCOL LIST DROPDOWN
   Topbar dropdown for selecting and managing saved protocols
   ============================================================ */

.protocol-list-wrapper {
    position: relative;
}

.topbar-btn {
    background: var(--btn-topbar-bg);
    height: 32px;
    width: 32px;
    border: 1px solid var(--btn-topbar-border);
    border-radius: var(--btn-topbar-radius);
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--btn-topbar-icon);
    box-shadow: var(--btn-topbar-shadow);
}

.topbar-btn:hover {
    background: var(--btn-topbar-bg-hover);
    color: var(--btn-topbar-icon-hover);
}

.topbar-btn img {
    filter: var(--topbar-icon-filter, none);
}

.protocol-list-dropdown {
    display: none;
    position: absolute;
    top: 3px;
    left: 50%;
    margin-top: 10px;
    width: 320px;
    background: #fff;
    border: 1px solid #999;
    border-radius: var(--input-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30);
    z-index: 500;
    overflow: hidden;
}

.protocol-list-dropdown.active {
    display: block;
}

.protocol-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.protocol-list::-webkit-scrollbar {
    width: 8px;
}

.protocol-list::-webkit-scrollbar-track {
    background: transparent;
}

.protocol-list::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--panel-scrollbar-radius);
}

.protocol-list::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.protocol-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #999;
    cursor: pointer;
    position: relative;
}

.protocol-item:last-child {
    border-bottom: none;
}

.protocol-item:hover {
    background: #f8f9fa;
}

.protocol-item.selected {
    background: 
    border-left: 3px solid var(--border-default);
    padding-left: 13px;
}

.protocol-item-content {
    flex: 1;
    min-width: 0;
}

.protocol-item-name {
    font-size: 13px;
    color: var(--text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.protocol-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.protocol-import-item {
    border-bottom: 1px solid #ddd;
    background: #f5f7fa;
}

.protocol-import-item .protocol-item-name {
    color: #0066b2;
    font-style: italic;
}

/* ============================================================
   KEBAB MENU BUTTON
   Three-dot menu on each protocol item
   ============================================================ */

.protocol-kebab-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--btn-panel-radius);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}

.protocol-item:hover .protocol-kebab-btn {
    opacity: 1;
}

.protocol-kebab-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.protocol-kebab-icon {
    width: 4px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.protocol-kebab-icon span {
    width: 4px;
    height: 4px;
    background: #666;
    border-radius: 50%;
}

/* ============================================================
   CONTEXT MENUS
   Dropdown menus for rename/delete actions
   ============================================================ */

.protocol-context-menu {
    position: absolute;
    right: 8px;
    top: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 600;
    display: none;
    overflow: hidden;
}

.protocol-context-menu.active {
    display: block;
}

.protocol-context-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-body);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.protocol-context-item:hover {
    background: #f5f5f5;
}

.protocol-context-item.danger {
    color: #dc3545;
}

.protocol-context-item.danger:hover {
    background: #fff5f5;
}

/* Right-click context menu (fixed position at cursor) */
.protocol-right-click-menu {
    position: fixed;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 700;
    display: none;
    overflow: hidden;
}

.protocol-right-click-menu.active {
    display: block;
}

