/* Collection search */
#lightningLocator {
    width: 100%;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
}

#lightningLocator,
#lightningLocator * {
    box-sizing: border-box;
}

#lightningLocator c-museum-inventory,
#lightningLocator lightning-input,
#lightningLocator lightning-combobox,
#lightningLocator lightning-base-combobox {
    display: block;
    min-width: 0;
}

/* Search and filter row */
#lightningLocator .styling-hooks > .slds-grid:first-child {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
}

#lightningLocator .styling-hooks > .slds-grid:first-child > .slds-col {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Labels */
#lightningLocator .slds-form-element__label {
    display: block;
    margin: 0 0 6px;
    color: #555;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

/* Input and dropdown positioning */
#lightningLocator .slds-form-element__control,
#lightningLocator .slds-combobox,
#lightningLocator .slds-combobox__form-element {
    position: relative;
}

#lightningLocator .slds-combobox_container {
    width: 100%;
}

/* Search input and dropdown buttons */
#lightningLocator input.slds-input,
#lightningLocator button.slds-combobox__input {
    display: block;
    width: 100%;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0 34px 0 12px;
    border: 1px solid transparent;
    border-radius: 0;
    background: #eee;
    box-shadow: none;
    color: #555;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 34px;
    text-align: left;
}

#lightningLocator input.slds-input {
    padding-left: 34px;
}

#lightningLocator input.slds-input::placeholder {
    color: #777;
    opacity: 1;
}

#lightningLocator button.slds-combobox__input {
    cursor: pointer;
}

#lightningLocator input.slds-input:focus-visible,
#lightningLocator button.slds-combobox__input:focus-visible {
    outline: 2px solid #555;
    outline-offset: 2px;
}

/* Search icon */
#lightningLocator svg.slds-input__icon_left {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 14px;
    height: 14px;
    margin: 0;
    transform: translateY(-50%);
    fill: #888;
    pointer-events: none;
}

/* Right-side icons */
#lightningLocator .slds-input__icon-group_right {
    position: absolute;
    top: 50%;
    right: 10px;
    display: flex;
    align-items: center;
    margin: 0;
    transform: translateY(-50%);
}

#lightningLocator .slds-icon-utility-down {
    position: static;
    width: 12px;
    height: 12px;
    margin: 0;
    transform: none;
    pointer-events: none;
}

#lightningLocator .slds-icon-utility-down svg {
    display: block;
    width: 12px;
    height: 12px;
    fill: #777;
}

#lightningLocator .slds-truncate {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Collection description */
#lightningLocator .styling-hooks > .slds-m-top_x-large {
    margin-top: 36px;
}

#lightningLocator .information {
    text-align: center;
}

#lightningLocator .information p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
}

/* Tablet */
@media (max-width: 767px) {
    #lightningLocator .styling-hooks > .slds-grid:first-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 479px) {
    #lightningLocator .styling-hooks > .slds-grid:first-child {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

/* Dropdown panel */
#lightningLocator .slds-combobox .slds-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    width: 100%;
    min-width: 0;
    max-height: 280px;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
}

/* Show the panel when Salesforce opens it */
#lightningLocator .slds-combobox:not(.slds-is-open) .slds-dropdown {
    display: none;
}

#lightningLocator .slds-combobox.slds-is-open .slds-dropdown {
    display: block;
}

/* Open dropdown button */
#lightningLocator button.slds-combobox__input[aria-expanded="true"] {
    border-color: #777;
    background: #e5e5e5;
}

/* Dropdown options */
#lightningLocator .slds-dropdown .slds-listbox__option {
    min-height: 36px;
    padding: 8px 12px;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

/* Mouse hover and keyboard highlight */
#lightningLocator .slds-dropdown .slds-listbox__option:hover,
#lightningLocator .slds-dropdown .slds-listbox__option:focus,
#lightningLocator .slds-dropdown .slds-listbox__option.slds-has-focus {
    background: #eee;
}

/* Currently selected option */
#lightningLocator .slds-dropdown .slds-listbox__option[aria-selected="true"] {
    background: #e2e2e2;
    color: #222;
    font-weight: 700;
}

/* Allow long option labels to wrap */
#lightningLocator .slds-dropdown .slds-truncate {
    white-space: normal;
    overflow-wrap: anywhere;
}
		
		/* Stack dropdown options */
#lightningLocator .slds-dropdown [role="group"],
#lightningLocator .slds-dropdown .slds-listbox__item,
#lightningLocator .slds-dropdown lightning-base-combobox-item {
    display: block;
    width: 100%;
}

#lightningLocator .slds-dropdown .slds-listbox__option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 8px 12px;
    text-align: left;
}

/* Keep the selection checkmark small */
#lightningLocator .slds-dropdown lightning-icon,
#lightningLocator .slds-dropdown lightning-primitive-icon {
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

#lightningLocator .slds-dropdown svg {
    display: block;
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    fill: #555;
}

/* Align option icons and text */
#lightningLocator .slds-dropdown .slds-media__figure {
    flex: 0 0 16px;
    margin: 0;
}

#lightningLocator .slds-dropdown .slds-media__body {
    flex: 1;
    min-width: 0;
}

/* Prevent horizontal scrolling */
#lightningLocator .slds-dropdown {
    overflow-x: hidden;
}

#lightningLocator .slds-dropdown .slds-listbox {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}