/* ==========================================================================
   Configurator Custom Styles
   ========================================================================== */

/* Fix for 100vh viewport */
body,
html {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Configurator Layout */
.configurator-layout {
    height: 100vh;
}

/* Product Browser Specific */
.configurator-product-browser {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.browser-header {
    flex-shrink: 0;
}

.browser-content {
    flex: 1;
    overflow-y: auto;
}

/* View Toggle Icons */
.view-toggle .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-icon {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.list-line {
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.grid-icon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 12px;
    height: 12px;
}

.grid-square {
    background: currentColor;
    border-radius: 1px;
}

/* Browser Items */
.browser-item {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.browser-item:hover {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.15);
}

.browser-item.product:hover .drag-overlay {
    opacity: 1;
}

/* Item Icons */
.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    /* border-radius: 6px; */
    overflow: hidden;
    /* background: var(--bs-light); */
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.default-icon {
    font-size: 1.5rem;
    color: var(--bs-secondary);
}

/* Text Truncation */
.item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-description {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Drag Overlay */
.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--bs-primary-rgb), 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
}

.drag-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.drag-icon {
    font-size: 1.5rem;
}

.drag-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Selection Menu */
.product-selection-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--bs-border-color);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-selection-menu.visible {
    transform: translateX(0);
}

.menu-content {
    flex: 1;
    overflow-y: auto;
}

/* Color Options */
.color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--bs-border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-btn:hover {
    border-color: var(--bs-primary);
    transform: scale(1.1);
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--bs-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    background: var(--bs-light);
    color: var(--bs-dark);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--bs-secondary);
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .configurator-layout {
        flex-direction: column;
    }

    .product-selection-menu {
        width: 100%;
        height: 50%;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
    }

    .product-selection-menu.visible {
        transform: translateY(0);
    }
}

.btn-delete-x {
  --bs-btn-close-color: #a7acb2;
  --bs-btn-close-bg: url("data:image/svg+xml,%3Csvg width='150px' height='151px' viewBox='0 0 150 151' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cpolygon id='path-1' points='131.251657 0 74.9933705 56.25 18.7483426 0 0 18.75 56.2450278 75 0 131.25 18.7483426 150 74.9933705 93.75 131.251657 150 150 131.25 93.7549722 75 150 18.75'%3E%3C/polygon%3E%3C/defs%3E%3Cg id='🎨-%5BSetup%5D:-Colors-&amp;-Shadows' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Artboard' transform='translate%28-225.000000, -250.000000%29'%3E%3Cg id='Icon-Color' transform='translate%28225.000000, 250.500000%29'%3E%3Cuse fill='%23a7acb2' xlink:href='%23path-1'%3E%3C/use%3E%3Cuse fill-opacity='0.5' fill='%23a7acb2' xlink:href='%23path-1'%3E%3C/use%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --bs-btn-close-opacity: 0.95;
  --bs-btn-close-hover-opacity: 0.95;
  --bs-btn-close-focus-shadow: none;
  --bs-btn-close-focus-opacity: 0.95;
  --bs-btn-close-disabled-opacity: 0.25;
  --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
  box-sizing: content-box;
  width: .8em;
  height: .8em;
  padding: .25em .25em;
  color: var(--bs-btn-close-color);
  background: rgba(0,0,0,0) var(--bs-btn-close-bg) center/0.8em auto no-repeat;
  border: 0;
  border-radius: .375rem;
  opacity: var(--bs-btn-close-opacity);
}