/* Component: Dropdown
 * Description: Styles for a dropdown component, including button, content area, header, 
 *              profile section, and responsive/mobile adjustments. 
 *              Provides visual structure, animations, and interactive states for dropdown menus, 
 *              supporting profile pictures, logos, and accessibility on various devices.
 */

 
/* Dropdown component */
.smd-component_dropdown {
    position: relative;
    display: inline-block;
}

.smd-component_dropdown-dropbtn {
    background-color: var(--color-navbar--primary-transparent);
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    color: white;
    font-family: var(--font-family-primary);
    display: flex;
    align-items: center;
}

/* Dropdown content header */
.smd-component_dropdown-header {
    padding: 10px;
}

.smd-component_dropdown-header hr {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--color-background-lighter);
    margin-top: -10px;
}

/* Dropdown content */
.smd-component_dropdown-content {
    right: -90px;
    margin-top: 10px;
    position: absolute;
    background-color: var(--color-background-dark);
    width: 350px;
    height: auto;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: block;
    transform: translateY(-10px);
    transition: visibility 0s linear 0.3s, opacity 0.3s ease, transform 0.3s ease;
    border-radius: 15px;
    /* display: none; */
}

/* Dropdown content main */
.smd-component_dropdown-content-main a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    background-color: var(--color-background-medium);
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
}

.smd-component_dropdown-content-main-text {
    margin-left: 10px;
}

.smd-component_dropdown-content-main a:hover {
    background-color: var(--color-background-lighter);
}

.smd-component_dropdown-content-main hr {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--color-background-lighter);
    margin-top: 10px;
    padding-bottom: 10px; 
    margin-left: 10px;
    margin-right: 10px;
}


.smd-component_dropdown-content.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0);
    transition-delay: 0s;
    z-index: 10000;
}

/* Dropdown header profile + logo*/
.smd-component_dropdown-profile {
    color: white;
    float: right;
    display: flex;
    align-items: center;
}

.smd-component_dropdown-logo {
    width: 80px;
}

.smd-component_dropdown-profile-picture {
    border-radius: 20px;
    margin-left: 15px;
    width: 30px;
    margin-top: 10px;
    margin-right: 10px;
    padding: 2px;
    background: var(--color-background-lighter);
    position: relative;
}

.smd-component_dropdown-profile-picture img {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    display: block;
}

.smd-component_dropdown-profile-picture::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--color-background-medium);
    border-radius: 22px;
    z-index: -1;
}

.smd-component_dropdown-profile-picture--one {
    background: var(--color-background-dark) !important;
}

.smd-component_dropdown-profile-picture--one::after {
    background: var(--gradient-one) !important;
    animation: spin 5s linear infinite;
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.smd-component_dropdown-profile-name {
    margin-top: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.smd-component_dropdown-spacer {
    margin-top: 10px;
}


/* mobile-friendly adjustments */
@media screen and (max-width: 768px) {
    .smd-component_dropdown-dropbtn {
        padding: 12px;
    }

    .smd-component_dropdown-content {
        right: 0px;
        margin-top: 10px;
        visibility: hidden;
        position: absolute;
        background-color: var(--color-background-dark);
        width: min(350px, calc(100vw - 30px));
        height: auto;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
        z-index: 1;
        opacity: 0;
        transform: translateY(-10px);
        transition: visibility 0s linear 0.3s, opacity 0.3s ease, transform 0.3s ease;
        border-radius: 15px;
    }

    .smd-component_dropdown-header {
        padding: 8px;
    }

    .smd-component_dropdown-logo {
        width: 60px;
    }

    .smd-component_dropdown-profile-name {
        max-width: 120px;
        font-size: 14px;
    }

    .smd-component_dropdown-header hr {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    .smd-component_dropdown-content-main a:hover {
        background-color: var(--color-background-medium);
    }

    .smd-component_dropdown-content-main a:active {
        background-color: var(--color-background-lighter);
    }
}




/*     background: conic-gradient(
    from 0deg,
    #ff9900 0deg 55deg,
    transparent 55deg 60deg,

    #ff0000 60deg 115deg,
    transparent 115deg 120deg,

    #ff9900 120deg 175deg,
    transparent 175deg 180deg,

    #ff0000 180deg 235deg,
    transparent 235deg 240deg,

    #ff9900 240deg 295deg,
    transparent 295deg 300deg,

    #ff0000 300deg 355deg,
    transparent 355deg 360deg) !important;
    */