/**
 * BuddyBoss Skills Dropdown Styles
 * 
 * @package BuddyBoss Child Theme
 * @since 1.0.0
 */

/* Dropdown wrapper */
#bb-rl-skills-dropdown {
position: absolute;
    top: auto;
    left: 0;
    bottom: 37px;
    width: 528px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #002E51;
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    display: none;
    background-image: url(/wp-content/themes/buddyboss-theme-child/assets/image/membres-bg.png);
    background-repeat: repeat;
    background-position: center;
    background-size: inherit;
}

.bb-rl-category-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    gap: 8px;
    margin-bottom: 4px;
    padding: 4px 8px;
    background-color: #00599533;
}

/* Category content - closed by default */
.bb-rl-category-content {
    display: none;
}
.bb-rl-category-header img {
    width: 18px;
    height: 18px;
}

.bb-rl-category-header h5 {
    color: #F8F8FF;
    margin: 0;
    flex: 1;
    font-family: 'IBM Plex Sans';
    font-weight: 500;
    font-size: 13px;
    line-height: 140%;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}
#bb-rl-skills-dropdown .bb-rl-skill-category:last-child .bb-rl-category-header {
    margin-bottom: 0;
}
.bb-rl-category-header .bb-rl-category-percent,
#bb-rl-skills-dropdown .bb-rl-skill-header .bb-rl-category-percent{
        display: flex;
    align-items: center;
}
.bb-rl-category-header .bb-rl-category-percent .bb-rl-category-percentage,
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item .bb-rl-skill-header .bb-rl-skill-percentage{
    color: #F8F8FF;
    border: 1px solid #002E51;
    padding: 3px 8px;
    font-family: IBM Plex Mono;
    font-weight: 500;
    font-size: 13px;
    line-height: 18px;
    border-radius: 4px;
    background-color: #08121a73;
}
.bb-rl-skills-dropdown .bb-rl-skill-category .bb-rl-category-content .bb-rl-skill-item.selected .bb-rl-skill-percentage,
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item.selected .bb-rl-skill-header .bb-rl-skill-percentage {
    border: 1px solid #296410;
    background-color: transparent;
}
.bb-rl-category-header .bb-rl-category-percent .bb-rl-certification-icon,
#bb-rl-skills-dropdown .bb-rl-skill-header .bb-rl-category-percent .bb-rl-certification-icon{
        width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #002E51;
    border-radius: 4px;
    margin-left: 4px;
    flex-shrink: 0;
    min-width: 26px;
    min-height: 26px;
}
#bb-rl-skills-dropdown .bb-rl-category-header .bb-rl-expand-arrow,
#bb-rl-skills-dropdown .bb-rl-skill-header span.bb-rl-main-skill-arrow {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bb-rl-skills-dropdown .bb-rl-category-header .bb-rl-expand-arrow i,
#bb-rl-skills-dropdown .bb-rl-skill-header span.bb-rl-main-skill-arrow i {
    color: #F8F8FF;
        line-height: 6px;
}
#bb-rl-skills-dropdown .bb-rl-category-header .bb-rl-expand-arrow i.open,
#bb-rl-skills-dropdown .bb-rl-skill-header span.bb-rl-main-skill-arrow i.open {
    color: #9EF66A;
}
#bb-rl-skills-dropdown .bb-rl-category-header .bb-rl-expand-arrow i.bb-icon-angle-right:before,
#bb-rl-skills-dropdown .bb-rl-skill-header span.bb-rl-main-skill-arrow i.bb-icon-angle-right::before {
    content: '\f054';
    font-family: fontawesome;
    font-size: 10px;
    margin: 0;
}
.bb-rl-skills-dropdown .bb-rl-sub-sub-skills .bb-rl-sub-sub-skill label {
    display: flex;
    max-width: fit-content;
    border: 1px solid #002E51;
    border-radius: 4px;
    gap: 4px;
    padding: 3px 8px;
    font-family: 'IBM Plex Sans';
    font-weight: 400;
    font-size: 13px;
    line-height: 140%;
    color: #F8F8FF;
    width: auto;
    margin-bottom: 4px;
    cursor: pointer;
}
.bb-rl-skills-dropdown .bb-rl-sub-sub-skills .bb-rl-sub-sub-skill.certified label {
    border: 1px solid #0A8194;
    background-color: transparent;
    color: #00DFEF;
    cursor: not-allowed !important;
}
.bb-rl-skills-dropdown .bb-rl-sub-sub-skills .bb-rl-sub-sub-skill.selected label{
    border: 1px solid #296410;
}
.bb-rl-skills-dropdown .bb-rl-sub-sub-skills .bb-rl-sub-sub-skill label input.sub-skill-checkbox {
    display: none;
}
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item.certified span.bb-rl-skill-percentage {
    background: linear-gradient(135deg, rgba(0, 223, 239, 0.1) 0%, rgba(0, 180, 204, 0.1) 100%);
    border: 1px solid rgba(0, 223, 239, 0.3);
}
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item.certified .bb-rl-certification-icon {
    border: 1px solid #00DFEF;
}
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item .bb-rl-sub-skills .bb-rl-sub-sub-skill:last-child label {
    margin-bottom: 0;
}


/* Arrow icons */
.bb-icon-arrow-down,
.bb-icon-arrow-right {
    transition: transform 0.2s ease;
    font-size: 14px;
    margin-left: 6px;
}

.bb-category-toggle.open {
        color: #00DFEF;
}
.bb-category-toggle.open::before {
    transform: rotate(90deg);
}

.bb-skill-toggle.open {
        color: #00DFEF;
}
.bb-skill-toggle.open::before {
    transform: rotate(90deg);
}

/* Skills */
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item {
    min-height: auto;
    margin-bottom: 0;
}
.bb-rl-skill-item,
.bb-rl-sub-skill {
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}
.bb-rl-skill-item {
    margin-bottom: 4px;
}
.bb-rl-sub-skills label.bb-rl-sub-skill input.sub-skill-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #00DFEF;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease !important;
}
.bb-rl-sub-skills label.bb-rl-sub-skill input.sub-skill-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 50% !important;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(/wp-content/themes/buddyboss-theme-child/assets/image/blue-arrow.svg);
    background-repeat: no-repeat;
    width: 8px;
    height: 7px;
    background-size: contain;
    background-position: center center;
}
.bb-rl-skill-header {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    position: relative;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
#bb-rl-skills-dropdown .bb-rl-category-content .bb-rl-skill-item .bb-rl-skill-header span.bb-rl-skill-name {
    color: #F8F8FF;
    flex: 1;
    display: flex;
    gap: 4px;
    font-family: 'IBM Plex Sans';
    font-weight: 500;
    font-size: 13px;
    line-height: 140%;
}
.bb-rl-checkbox-label {
    margin-left: 6px;
    color: #F8F8FF;
    font-family: IBM Plex Mono;
    font-weight: 400;
    font-size: 13px;
    line-height: 140%;
}

/* Sub-skills */
.bb-rl-sub-skills {
    padding: 4px 8px;
}
.bb-rl-sub-skills label.bb-rl-sub-skill{
        border: 1px solid #002E51;
    width: fit-content;
    padding: 4px 8px !important;
    border-radius: 4px;
    font-family: IBM Plex Sans;
    font-weight: 400;
    font-size: 13px;
    line-height: 140%;
    color: #F8F8FF;
}
/* Clean checkbox styling */
.bb-rl-skills-dropdown input[type="checkbox"] {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important; 
    background-color: #00000085 !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.bb-rl-skills-dropdown input[type="checkbox"]:checked {
    border: 1px solid #9EF66A;
    background-color: #9ef66a0f;
}

.bb-rl-skills-dropdown input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50% !important;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(/wp-content/themes/buddyboss-theme-child/assets/image/right-arrow.svg);
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    background-size: 50%;
    background-position: center center;
}

.bb-rl-skills-dropdown label {
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
}

.bb-rl-skill-item,
.bb-rl-sub-skill {
    position: relative !important;
    min-height: 24px;
}

.bb-readylaunch-template input[type=checkbox]:not(.bb-custom-check), .bb-rl-styled-checkbox {
    position: relative !important;
    opacity: 1 !important;
}

/* Ensure checkboxes are clickable */
#bb-rl-skills-dropdown input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
}

#bb-rl-skills-dropdown label {
    pointer-events: auto !important;
    cursor: pointer;
    position: relative !important;
    z-index: 10 !important;
}


/* Vote Buttons Styles */
.vote-buttons { 
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
}

.vote-btn {
    border: 1px solid #002E51;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-family: IBM Plex Sans;
    font-weight: 600;
    font-size: 13px;
    line-height: 18px;
    color: #F8F8FF;
    background-color: transparent;
    background-image: url(/wp-content/themes/buddyboss-theme-child/assets/image/leaderborad-blue.svg);
    background-repeat: repeat;
    background-position: center;
    background-size: inherit;
}
.vote-buttons .vote-btn:hover{
    background: #00599533;
    border-color: #002E51;
}
.vote-btn span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.vote-btn span img {
    width: 7.5px;
    height: 7.5px;
}
.vote-btn[data-vote="up"] span{
color: #00DFEF;
}
.vote-btn[data-vote="down"] span{
color: #E54F6D;
}



.vote-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.vote-success {
    color: #00c58e;
    font-size: 12px;
    margin-left: 10px;
    font-weight: 500;
}

.vote-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-left: 10px;
    font-weight: 500;
}

/* Loading and Error States */
.bb-rl-skills-loading,
.bb-rl-skills-error {
    padding: 20px;
    text-align: center;
    color: #F8F8FF;
    font-family: IBM Plex Mono;
    font-size: 14px;
}

.bb-rl-skills-loading span,
.bb-rl-skills-error span {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #002E51;
    border-radius: 4px;
    background: rgba(0, 46, 81, 0.3);
}

.bb-rl-skills-error span {
    color: #E54F6D;
    border-color: #E54F6D;
}

@media (max-width: 767px) {
.vote-buttons { 
            padding:0;
}
}