/* Modern Attribute Selector Styles */
.modern-attribute-selector {
    width: 100%;
    margin: 5px 0 0 0;
}

.attr-selector-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.attr-column {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #c9cccf;
    border-radius: 6px;
    overflow: hidden;
}

.attr-column-header {
    padding: 12px 16px;
    background: #f6f6f7;
    border-bottom: 1px solid #c9cccf;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #202223;
}

.attr-column-header strong {
    flex: 1;
}

.attr-column-header .hint--left,
.attr-column-header .hint--right {
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.attr-column-header .fa {
    font-size: 14px;
    color: #6d7175;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #c9cccf;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-bottom-color: #008060;
}

.attr-list {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.attr-item {
    padding: 6px 16px;
    border-bottom: 1px solid #e1e3e5;
    cursor: move;
    transition: background-color 0.15s, opacity 0.15s;
    user-select: none;
    background: #fff;
}

.attr-item:hover {
    background: #f6f6f7;
}

.attr-item.selected {
    background: #e1f3ff;
}

.attr-item.attr-selected-selection {
    background: #66b3ff;
    color: #fff;
}

.attr-item.attr-selected-selection:hover {
    background: #66b3ff;
}

.attr-item.dragging {
    opacity: 0.5;
    background: #e1e3e5;
}

.attr-item.drag-over {
    border-top: 2px solid #008060;
}

.attr-item.drag-over-bottom {
    border-bottom: 2px solid #008060;
}

/* Ghost placeholder styles - shows where the dragged item will be dropped */
.attr-item.drag-ghost-placeholder {
    opacity: 0.4 !important;
    background: #e1f3ff !important;
    border: 2px dashed #008060 !important;
    border-radius: 4px !important;
    pointer-events: none !important;
    position: relative !important;
    z-index: 1000 !important;
    margin: 2px 0 !important;
    animation: ghost-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(0, 128, 96, 0.2) !important;
}

.attr-item.drag-ghost-placeholder .attr-item-content {
    color: #008060 !important;
    font-weight: 500 !important;
}

@keyframes ghost-pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.02);
    }
}

.attr-item-content {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #202223;
}

.attr-item-content .hint--left {
    width: 100%;
    display: block;
}

.attr-column-footer {
    padding: 8px 12px;
    background: #f6f6f7;
    border-top: 1px solid #c9cccf;
}

.attr-column-footer .custom-header {
    display: flex;
    gap: 8px;
    align-items: center;
}

.attr-column-footer .custom-header button {
    flex: 1;
    width: 100%;
    /* Polaris Button styles - matching app buttons */
    all: unset;
    position: relative;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--p-space-050, 4px);
    padding: var(--p-space-200, 8px) var(--p-space-300, 12px);
    background: var(--p-color-bg-fill, #ffffff);
    border: none;
    border-radius: var(--p-border-radius-200, 6px);
    box-shadow: var(--p-shadow-button, 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.1));
    color: var(--p-color-text, #202223);
    font-size: var(--p-font-size-300, 14px);
    font-weight: var(--p-font-weight-medium, 500);
    line-height: var(--p-font-line-height-400, 1.4);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.attr-column-footer .custom-header button:hover {
    background: var(--p-color-bg-fill-hover, #f6f6f7);
    box-shadow: var(--p-shadow-button, 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.1));
}

.attr-column-footer .custom-header button:active {
    background: var(--p-color-bg-fill-active, #e1e3e5);
    box-shadow: var(--p-shadow-button-inset, inset 0 1px 0 0 rgba(0, 0, 0, 0.05));
}

.attr-column-footer .custom-header button:focus-visible {
    outline: var(--p-border-width-050, 1px) solid var(--p-color-border-focus, #008060);
    outline-offset: var(--p-space-025, 2px);
}

.attr-column-footer .custom-header button i {
    font-size: 14px;
    margin-left: 4px;
}

/* Scrollbar styling */
.attr-list::-webkit-scrollbar {
    width: 8px;
}

.attr-list::-webkit-scrollbar-track {
    background: #f6f6f7;
}

.attr-list::-webkit-scrollbar-thumb {
    background: #c9cccf;
    border-radius: 4px;
}

.attr-list::-webkit-scrollbar-thumb:hover {
    background: #aeb4b9;
}

/* Empty state */
.attr-list:empty::after {
    content: "No attributes available";
    display: block;
    padding: 20px;
    text-align: center;
    color: #6d7175;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .attr-selector-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .attr-list {
        height: 250px;
    }

    /* Mobile optimizations for footer buttons */
    .attr-column-footer .custom-header {
        flex-direction: column;
        gap: 8px;
    }

    .attr-column-footer .custom-header button {
        width: 100%;
        min-height: 36px;
        justify-content: center;
        font-size: 13px;
        padding: 8px 12px;
    }

    .attr-column-footer .custom-header button i {
        font-size: 14px;
    }
}

