/* Follow me for more pens like this! */

/* Tweak to change the look and feel */
:root {
    --button-background: dodgerblue;
    --button-color: white;

    --dropdown-highlight: dodgerblue;
    --dropdown-width: 260px;
    --dropdown-background:#8660a9;
    --dropdown-color: white;
}

/* Boring button styles */
a.button {
    /* Frame */
    display: inline-block;
    padding: 20px 28px;
    border-radius: 50px;
    box-sizing: border-box;

    /* Style */
    border: none;
    background: var(--button-background);
    color: var(--button-color);
    font-size: 24px;
    cursor: pointer;
}

a.button:active {
    filter: brightness(75%);
}

/* Dropdown styles */
.dropdown {
    position: relative;
    padding: 0;
    margin-right: 1em;
    border: none;

}

.dropdown summary {
    list-style: none;
    text-transform: uppercase;
}

.dropdown > summary::-webkit-details-marker {
    display: none;
}

.dropdown summary:focus {
    outline: none;
}

.dropdown summary:focus a.button {
    border: 2px solid white;
}

.dropdown summary:focus {
    outline: none;
}

.dropdown ul {
    position: absolute;
    margin-top: 10px;
    padding-left: 10px;
    width: var(--dropdown-width);
    box-sizing: border-box;
    z-index: 20;
    background: var(--dropdown-background);
    list-style: none;
}

.dropdown ul li {
    padding: 0;
    margin: 0;
    display: flex;
    position: relative;
}

.dropdown ul li a:link, .dropdown ul li a:visited {
    display: inline-block;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    color: var(--dropdown-color);
    text-decoration: none;
}

.dropdown ul li i {
    position: absolute;
    right: 20px;
    top:50%;
    transform: translateY(-50%);
    font-size: 10px;
}


/* Close the dropdown with outside clicks */
.dropdown > summary::before {
    display: none;
}

.dropdown[open] > summary::before {
    content: ' ';
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1;
}
.dropdown .nested-dropdown {
    position: absolute;
    left: 100%; /* Position it to the right of the parent dropdown */
    top: 0;
    display: none;/* Initially hide nested dropdown */
}

.dropdown-item:hover .nested-dropdown {
    display: block; /* Display nested dropdown on parent hover */
}

/* Adjust styles for nested dropdown items */
.dropdown .nested-dropdown ul {
    padding-left: 0;
    background: #9b75b4;
    list-style: disc !important;
    z-index:1000;
}

.dropdown .nested-dropdown ul li {
    display: block;
    padding-left: 10px;
}

.dropdown .nested-dropdown ul li a {
    padding: 5px 10px; /* Adjust padding as needed */
    font-size: 14px;
    color: var(--dropdown-color);
    text-decoration: none;
    display: block;
}

.dropdown .nested-dropdown ul li:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Add background color on hover */
}