/**
 * BuddyBoss Theme Toggle Styles
 */

/* General Styles */
.bb-theme-mode-dark {
    --bb-body-background-color: #222;
    --bb-content-background-color: #333;
    --bb-headings-color: #647385;
    --bb-primary-color: #647385;
    --bb-body-text-color: #f2f2f2;
    --bb-content-border-color: #555759;
    --bb-header-background: #1c252b;
    --bb-footer-background: #1c252b;
    
    /* Compatibility variables */
    --bb-background-color: var(--bb-body-background-color);
    --bb-alternate-background-color: var(--bb-content-background-color);
    --bb-primary-text-color: var(--bb-headings-color);
    --bb-alternate-text-color: var(--bb-body-text-color);
    --bb-content-alternate-background-color: var(--bb-content-background-color);
    --bb-content-border-hover-color: var(--bb-content-border-color);
}

/* Theme Settings Page Styles */
.bb-theme-toggle-settings {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bb-content-background-color, #fff);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bb-theme-mode-toggle {
    margin-bottom: 20px;
}

.bb-theme-mode-toggle label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.theme-mode-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.theme-mode-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

/* Floating toggle button */
.bb-floating-theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bb-primary-color, #385DFF);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.bb-floating-theme-toggle:hover {
    transform: scale(1.1);
}

/* Shortcode Styles */

/* Theme Toggle Shortcode */
.bb-theme-toggle-shortcode {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.bb-theme-toggle-shortcode .toggle-label {
    margin-right: 10px;
    font-weight: 500;
}

/* Switch Style */
.theme-mode-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--bb-primary-color, #385DFF);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--bb-primary-color, #385DFF);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Toggle Button Style */
.theme-mode-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80px;
    height: 36px;
    border-radius: 18px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    position: relative;
    padding: 0 5px;
    overflow: hidden;
}

.theme-mode-toggle-btn:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--bb-primary-color, #385DFF);
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.theme-mode-toggle-btn[aria-pressed="true"]:after {
    transform: translateX(44px);
}

.toggle-icon {
    z-index: 2;
    line-height: 1;
    font-size: 18px;
}

/* Buttons Style */
.theme-mode-buttons {
    display: flex;
    gap: 5px;
}

.theme-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    background-color: #f7f7f7;
}

.theme-btn.active {
    background-color: var(--bb-primary-color, #385DFF);
    color: white;
    border-color: var(--bb-primary-color, #385DFF);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bb-theme-toggle-shortcode {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bb-theme-toggle-shortcode .toggle-label {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .theme-mode-buttons {
        width: 100%;
    }
    
    .theme-btn {
        flex: 1;
        justify-content: center;
    }
}