.pawm-list-container {
    width: 100%;
}

.pawm-list-container ul {
    list-style: none;
}

.pawm-list-item > .pawm-item-content {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
}

.pawm-list-item > .pawm-item-content > a {
    text-decoration: none;
}

.pawm-list-item > .pawm-item-content > a:hover {
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
    transition: all .4s ease-out;
}

.pawm-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid lightgray;
    border-bottom: 1px solid lightgray;
    padding: 5px 0;
}

/* Accordion styles */
.pawm-folder-header {
    cursor: pointer;
    user-select: none;
}

.pawm-folder-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.pawm-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.pawm-chevron {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.pawm-list-item.expanded > .pawm-item-content .pawm-chevron {
    transform: rotate(90deg);
}

.pawm-folder-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.pawm-list-item.expanded > .pawm-folder-content {
    max-height: 10000px;
    transition: max-height 0.5s ease-in;
}

.pawm-folder-name {
    font-weight: 500;
}

.pawm-folder-count {
    font-size: 0.9em;
    opacity: 0.7;
    font-weight: normal;
}

.pawm-folder-icon {
    flex-shrink: 0;
}

/* Search bar styles */
.pawm-search-container {
    margin-bottom: 20px;
}

.pawm-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pawm-search-wrapper:focus-within {
    border-color: var(--wp--preset--color--primary, #0073aa);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.pawm-search-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.pawm-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 10px;
    font-size: 16px;
    outline: none;
    width: 100%;
}

.pawm-search-input::placeholder {
    color: #888;
}

.pawm-search-clear {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s, background 0.2s;
}

.pawm-search-clear:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.pawm-search-clear.visible {
    display: flex;
}

.pawm-search-results {
    margin-top: 8px;
    padding: 8px 12px;
    background: #e8f4f8;
    border-radius: 4px;
    font-size: 14px;
}

.pawm-results-count {
    color: #555;
}

/* Search highlight and visibility */
.pawm-list-item.pawm-hidden {
    display: none;
}

.pawm-list-item.pawm-match > .pawm-item-content {
    background-color: rgba(255, 235, 59, 0.3);
    border-radius: 4px;
}

.pawm-list-item.pawm-has-match {
    display: list-item;
}

.pawm-list-item.pawm-has-match.expanded > .pawm-folder-content {
    max-height: 10000px;
}
