.sop-dropdown-wrapper { 
    display: none; 
    position: relative;
    z-index: 100;
    isolation: isolate;
}
.sop-horizontal-wrapper { display: flex; gap: 10px; flex-wrap: wrap; }

.scroll-on-page-wrapper.left .sop-horizontal-wrapper { justify-content: flex-start; }
.scroll-on-page-wrapper.center .sop-horizontal-wrapper { justify-content: center; }
.scroll-on-page-wrapper.right .sop-horizontal-wrapper { justify-content: flex-end; }

@media(min-width:768px){
    .scroll-on-page-wrapper.dropdown-desktop .sop-dropdown-wrapper { display: block; }
    .scroll-on-page-wrapper.dropdown-desktop .sop-horizontal-wrapper { display: none; }
}

@media(max-width:767px){
    .scroll-on-page-wrapper.dropdown-mobile .sop-dropdown-wrapper { display: block; }
    .scroll-on-page-wrapper.dropdown-mobile .sop-horizontal-wrapper { display: none; }
}

.sop-btn {
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    border-radius: 7px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.sop-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.sop-btn.active-section {
    font-weight: 600;
}

/* Custom Dropdown Styles */
.sop-custom-dropdown {
    position: relative;
    width: 100%;
    max-width: 300px;
    z-index: 100;
    background: #fff;
    border-radius: 7px;
    overflow: visible;
    isolation: isolate;
}

/* Header/Trigger button - single element, no duplicate */
.sop-dropdown-trigger {
    background: #fff;
    color: #555;
    padding: 12px 16px;
    padding-right: 20px;
    cursor: pointer;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-radius: 7px;
    user-select: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    z-index: 101;
    margin-right: 0;
    pointer-events: auto;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
}

/* Red border on hover */
.sop-dropdown-trigger:hover {
    border: 2px solid #EC1065;
}

/* Red border when active/pressed or dropdown is open */
.sop-dropdown-trigger:active,
.sop-custom-dropdown.sop-dropdown-open .sop-dropdown-trigger {
    border: 2px solid #EC1065;
}

/* When dropdown is open, trigger has border on top, left, right only */
.sop-custom-dropdown.sop-dropdown-open .sop-dropdown-trigger {
    border-radius: 7px 7px 0 0;
    border-left: 2px solid #EC1065;
    border-right: 2px solid #EC1065;
    border-top: 2px solid #EC1065;
    border-bottom: 1px solid #e0e0e0;
}

.sop-dropdown-selected {
    font-weight: 400;
    font-size: 16px;
    flex: 1;
    color: #555;
    text-align: left;
    display: block;
}

.sop-dropdown-chevron {
    font-size: 10px;
    transition: transform 0.3s ease;
    margin-left: 10px;
    color: #000;
}

.sop-custom-dropdown.sop-dropdown-open .sop-dropdown-chevron {
    transform: rotate(180deg);
}

.sop-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    padding-left: 0;
    background: #fff;
    border-left: 2px solid #EC1065;
    border-right: 2px solid #EC1065;
    border-bottom: 2px solid #EC1065;
    border-top: none;
    border-radius: 0 0 7px 7px;
    max-height: 80vh;
    height: auto;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    margin-right: 0;
    contain: layout style paint;
}

.sop-custom-dropdown.sop-dropdown-open .sop-dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    top: 100%;
    border-radius: 0 0 7px 7px;
    margin-top: 0;
    max-height: 80vh;
    bottom: auto;
}

/* Override theme styles for entry-content ul/ol that might affect dropdown */
.entry-content .sop-dropdown-list,
.entry-content .sop-dropdown-list ul,
.entry-content .sop-dropdown-list ol {
    padding-left: 0;
    padding-inline-start: 0;
    margin-left: 0;
}

.sop-dropdown-item {
    padding: 12px 16px;
    padding-right: 20px;
    cursor: pointer;
    color: #555;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

.sop-dropdown-item:last-child {
    border-bottom: none;
}

.sop-dropdown-item:hover {
    color: #EC1065;
    background: #F4EEFF;
    border-left: 2px solid #EC1065;
    border-right: 2px solid transparent;
}

.sop-dropdown-item.sop-item-active {
    color: #EC1065;
    background: #F4EEFF;
    font-weight: 400;
    border-left: 2px solid #EC1065;
    border-right: none !important;
}

/* Custom scrollbar for dropdown */
.sop-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.sop-dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sop-dropdown-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sop-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
