/**
 * User Profile Styles
 * 
 * Styles for the RewardsWP member management in user profiles.
 *
 * @since 1.0.0
 */

/* Select2 container styling to match WordPress admin */
.rewardswp-member-select + .select2-container,
.rewardswp-member-select + .select2-container.select2-container--default {
    width: 25em !important;
    max-width: none !important;
    min-width: 25em !important;
}

.rewardswp-member-select + .select2-container .select2-selection {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-shadow: 0 0 0 transparent;
    transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
    background-color: #fff;
    color: #2c3338;
}

.rewardswp-member-select + .select2-container .select2-selection:hover {
    border-color: #8c8f94;
}

.rewardswp-member-select + .select2-container.select2-container--focus .select2-selection {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.rewardswp-member-select + .select2-container .select2-selection--single {
    height: 30px;
    line-height: 28px;
}

.rewardswp-member-select + .select2-container .select2-selection__rendered {
    padding-left: 8px;
    padding-right: 20px;
    color: #2c3338;
}

.rewardswp-member-select + .select2-container .select2-selection__arrow {
    height: 28px;
    width: 20px;
    right: 1px;
}

/* Dropdown styling */
.select2-dropdown {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
}

.select2-results__option {
    padding: 8px 12px;
    color: #2c3338;
}

.select2-results__option[aria-selected="true"] {
    background-color: #2271b1;
    color: #fff;
}

.select2-results__option--highlighted {
    background-color: #f0f6fc;
    color: #2c3338;
}

.select2-search__field {
    border: 1px solid #8c8f94;
    border-radius: 3px;
    padding: 4px 6px;
    outline: 0;
    color: #2c3338;
}

.select2-search__field:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Loading indicator */
.select2-results__option .loading {
    text-align: center;
    color: #646970;
    font-style: italic;
}

/* Description text styling to match WordPress standard */
.rewardswp-member-select + .select2-container + .description {
    margin: 2px 0 5px;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

/* Clear button */
.select2-selection__clear {
    color: #a7aaad;
    cursor: pointer;
    float: right;
    font-weight: bold;
}

.select2-selection__clear:hover {
    color: #c92c2c;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .rewardswp-member-select + .select2-container {
        max-width: 100%;
        width: 100% !important;
    }
    
    .rewardswp-member-select + .select2-container .select2-selection--single {
        height: 40px;
        line-height: 38px;
    }
    
    .rewardswp-member-select + .select2-container .select2-selection__arrow {
        height: 38px;
    }
}
