﻿.collection-page {
    display: flex;
    height: calc(100vh - 160px);
    border: 1px solid #ddd;
    background: #fff;
}

/* SIDEBAR */

.collection-sidebar {
    flex: 0 0 auto;
    width: 330px;
    min-width: 220px;
    max-width: 650px;
    border-right: 1px solid #ddd;
    background: #fafafa;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.collection-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #ddd;
}

.collection-title {
    font-weight: 600;
}

.icon-button {
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}



.collection-sidebar-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 20;
}

    .collection-sidebar-resizer:hover {
        background: rgba(0,112,150,.10);
    }

.collection-resize-layer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    cursor: col-resize;
    user-select: none;
}

/* GROUP */

.group {
    padding: 4px 0;
}

.group-row {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 8px;
}

.expand-button {
    width: 18px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #666;
    font-size: 11px;
    padding: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-name {
    flex: 1;
    border: 0;
    background: transparent;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
}

/* ITEMS */

.group-items {
}

.item-row {
    display: flex;
    align-items: center;
    gap: 0px;
    height: 28px;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
}

    .item-row:hover {
        background: #eee;
    }

    .item-row.selected {
        background: #e7eef7;
        border-left: 1px solid #d8d8d8;
    }

.item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ACTIONS */

.item-actions,
.group-actions {
    position: relative;
    display: flex;
    align-items: center;
}

.more-button {
    opacity: 0;
    height: 26px;
    width: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.group-row:hover .more-button,
.item-row:hover .more-button {
    opacity: 1;
}

.more-button:hover {
    background: #ececec;
}

/* MENU */

.menu-click-layer {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.menu-panel {
    position: absolute;
    top: 32px;
    right: 0;
    z-index: 100;
    width: 220px;
    padding: 10px 10px 10px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 9px;
    box-shadow: 0 12px 30px rgba(0,0,0,.14);
}

.item-row .menu-panel {
    top: 26px;
    width: 180px;
}

.menu-item {
    width: 100%;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    text-align: left;
    padding: 10px 16px;
    color: #222;
}

    .menu-item:hover {
        background: #f5f5f5;
    }

    .menu-item.danger {
        color: #d93025;
    }

.menu-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.menu-divider {
    height: 1px;
    margin: 8px 16px;
    background: #e2e2e2;
}

/* INLINE INPUTS */

.inline-input {
    width: calc(100% - 24px);
    margin: 6px 12px 10px 12px;
    padding: 6px 8px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
}

    .inline-input.sub {
        margin: 5px 12px 8px 34px;
    }

    .inline-input:focus {
        outline: none;
        border-color: rgb(0,112,150);
        box-shadow: 0 0 0 .15rem rgba(0,112,150,.18);
    }

/* CONTENT */

.collection-content {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 18px;
}

.tab {
    border: 0;
    background: transparent;
    padding: 10px 0 12px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

    .tab.active {
        color: rgb(0,112,150);
        border-bottom-color: rgb(0,112,150);
        font-weight: 500;
    }

.empty-state {
    color: #777;
    margin-top: 40px;
}


.group-row,
.item-row {
    user-select: none;
}

    .group-row[draggable="true"],
    .item-row[draggable="true"] {
        cursor: grab;
    }

        .group-row[draggable="true"]:active,
        .item-row[draggable="true"]:active {
            cursor: grabbing;
        }

    .group-row.drop-before,
    .item-row.drop-before {
        position: relative;
    }

        .group-row.drop-before::before,
        .item-row.drop-before::before {
            content: "";
            position: absolute;
            left: 8px;
            right: 8px;
            top: -2px;
            height: 2px;
            background: rgb(0,112,150);
            border-radius: 2px;
        }

.item-url {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #666;
}

.method {
    min-width: 44px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

    .method.get {
        color: #168038;
    }

    .method.post {
        color: #7a3db8;
    }

    .method.put {
        color: #c27a00;
    }

    .method.delete {
        color: #d33131;
    }

    .method.other {
        color: #666;
    }


/* SETTINGS TABS */

.settings-title {
    margin-top: 12px;
    margin-bottom: 12px;
    font-size: 15px;
}

.settings-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

.settings-action {
    border: 0;
    background: transparent;
    color: #222;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 6px;
}

    .settings-action:hover {
        background: #f5f5f5;
        border-radius: 6px;
    }

    .settings-action.danger {
        color: #d93025;
    }

.settings-action-icon {
    font-size: 13px;
    display: flex;
    align-items: center;
}

.settings-table {
    margin-bottom: 18px;
    vertical-align: middle;
}

    .settings-table td {
        vertical-align: middle;
    }

.settings-row {
    user-select: none;
}

    .settings-row[draggable="true"] {
        cursor: grab;
    }

        .settings-row[draggable="true"]:active {
            cursor: grabbing;
        }

    .settings-row.drop-before td {
        box-shadow: inset 0 2px 0 rgb(0,112,150);
    }

.settings-drag-cell {
    width: 28px;
    color: #888;
    text-align: center;
    vertical-align: middle;
}

.settings-drag-handle {
    min-height: 32px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
