/**
 * Profile Switcher Widget - v4.0.1
 */

/* === WRAPPER === */
.pse-widget {
    position: relative;
}

.pse-wrap {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* === SWITCHER CONTAINER === */
.pse-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 1px solid #cccccc;
    border-radius: 50px;
    padding: 4px;
    background-color: #f5f5f5;
}

/* === SLIDER (moves behind active tab) === */
.pse-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    border-radius: 50px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

/* === TAB BUTTON - Override Elementor global button styles === */
/* Must override .elementor-kit-X button styles */
[class*="elementor-kit"] .pse-switcher button.pse-tab,
.elementor-widget-profile_switcher button.pse-tab,
.pse-widget button.pse-tab,
.pse-switcher button.pse-tab,
button.pse-tab {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    margin: 0 !important;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    border-radius: 50px !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    z-index: 1 !important;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    color: #666666; /* Default - Elementor will override with !important */
    line-height: 1.4 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: color 0.3s ease !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

[class*="elementor-kit"] .pse-switcher button.pse-tab:hover,
.elementor-widget-profile_switcher button.pse-tab:hover,
.pse-widget button.pse-tab:hover,
.pse-switcher button.pse-tab:hover,
button.pse-tab:hover {
    color: #333333; /* Default hover - Elementor will override */
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

[class*="elementor-kit"] .pse-switcher button.pse-tab.pse-active,
.elementor-widget-profile_switcher button.pse-tab.pse-active,
.pse-widget button.pse-tab.pse-active,
.pse-switcher button.pse-tab.pse-active,
button.pse-tab.pse-active {
    color: #000000; /* Default active - Elementor will override */
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

button.pse-tab:focus {
    outline: none !important;
    box-shadow: none !important;
}

button.pse-tab:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

/* === LABEL === */
.pse-label {
    position: relative;
    z-index: 1;
}

/* === ICON === */
.pse-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px;
    height: 20px;
    font-size: 20px;
    flex-shrink: 0;
    color: inherit;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.pse-icon i {
    color: inherit !important;
}

.pse-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* SVG with mask for color control */
.pse-svg {
    display: block;
    width: 100%;
    height: 100%;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.3s ease;
}

/* === DIVIDER === */
.pse-switcher .pse-divider,
.pse-widget .pse-divider,
.pse-divider {
    display: inline-block !important;
    visibility: visible !important;
    width: 1px !important;
    min-width: 1px !important;
    height: 20px !important;
    min-height: 20px !important;
    background: #888888 !important;
    background-color: #888888 !important;
    margin: 0 2px !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease;
    z-index: 2 !important;
    flex-shrink: 0 !important;
    pointer-events: none;
    align-self: center !important;
}

.pse-divider.pse-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* === HELPER TEXT === */
.pse-helper {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: #666666;
}

/* === CONTENT PANELS === */
.pse-panels {
    position: relative;
    margin-top: 24px;
}

.pse-panel {
    display: none;
}

.pse-panel.pse-active {
    display: block;
}

/* === EDITOR PREVIEW === */
.elementor-editor-active .pse-panel {
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px dashed #cccccc;
    opacity: 0.5;
}

.elementor-editor-active .pse-panel.pse-active {
    opacity: 1;
    border-color: #0073aa;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .pse-slider,
    button.pse-tab,
    .pse-divider,
    .pse-icon,
    .pse-svg {
        transition: none !important;
    }
}

/* === MOBILE: STACK VERTICALLY === */
/* 480px breakpoint */
@media (max-width: 480px) {
    .pse-mobile-stack.pse-bp-480 .pse-switcher {
        flex-direction: column !important;
        width: 100% !important;
        border-radius: 25px !important;
    }
    .pse-mobile-stack.pse-bp-480 .pse-tab {
        width: 100% !important;
        justify-content: center !important;
    }
    .pse-mobile-stack.pse-bp-480 .pse-slider {
        width: calc(100% - 8px) !important;
        left: 4px !important;
    }
    .pse-mobile-stack.pse-bp-480 .pse-divider {
        width: 80% !important;
        height: 1px !important;
        min-height: 1px !important;
        margin: 2px auto !important;
    }
}

/* 600px breakpoint */
@media (max-width: 600px) {
    .pse-mobile-stack.pse-bp-600 .pse-switcher {
        flex-direction: column !important;
        width: 100% !important;
        border-radius: 25px !important;
    }
    .pse-mobile-stack.pse-bp-600 .pse-tab {
        width: 100% !important;
        justify-content: center !important;
    }
    .pse-mobile-stack.pse-bp-600 .pse-slider {
        width: calc(100% - 8px) !important;
        left: 4px !important;
    }
    .pse-mobile-stack.pse-bp-600 .pse-divider {
        width: 80% !important;
        height: 1px !important;
        min-height: 1px !important;
        margin: 2px auto !important;
    }
}

/* 768px breakpoint */
@media (max-width: 768px) {
    .pse-mobile-stack.pse-bp-768 .pse-switcher {
        flex-direction: column !important;
        width: 100% !important;
        border-radius: 25px !important;
    }
    .pse-mobile-stack.pse-bp-768 .pse-tab {
        width: 100% !important;
        justify-content: center !important;
    }
    .pse-mobile-stack.pse-bp-768 .pse-slider {
        width: calc(100% - 8px) !important;
        left: 4px !important;
    }
    .pse-mobile-stack.pse-bp-768 .pse-divider {
        width: 80% !important;
        height: 1px !important;
        min-height: 1px !important;
        margin: 2px auto !important;
    }
}

/* 1024px breakpoint */
@media (max-width: 1024px) {
    .pse-mobile-stack.pse-bp-1024 .pse-switcher {
        flex-direction: column !important;
        width: 100% !important;
        border-radius: 25px !important;
    }
    .pse-mobile-stack.pse-bp-1024 .pse-tab {
        width: 100% !important;
        justify-content: center !important;
    }
    .pse-mobile-stack.pse-bp-1024 .pse-slider {
        width: calc(100% - 8px) !important;
        left: 4px !important;
    }
    .pse-mobile-stack.pse-bp-1024 .pse-divider {
        width: 80% !important;
        height: 1px !important;
        min-height: 1px !important;
        margin: 2px auto !important;
    }
}

/* === MOBILE: HORIZONTAL SCROLL === */
@media (max-width: 480px) {
    .pse-mobile-scroll.pse-bp-480 .pse-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .pse-mobile-scroll.pse-bp-480 .pse-switcher {
        flex-wrap: nowrap !important;
    }
}
@media (max-width: 600px) {
    .pse-mobile-scroll.pse-bp-600 .pse-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .pse-mobile-scroll.pse-bp-600 .pse-switcher {
        flex-wrap: nowrap !important;
    }
}
@media (max-width: 768px) {
    .pse-mobile-scroll.pse-bp-768 .pse-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .pse-mobile-scroll.pse-bp-768 .pse-switcher {
        flex-wrap: nowrap !important;
    }
}
@media (max-width: 1024px) {
    .pse-mobile-scroll.pse-bp-1024 .pse-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .pse-mobile-scroll.pse-bp-1024 .pse-switcher {
        flex-wrap: nowrap !important;
    }
}

/* === MOBILE: SHRINK TEXT === */
@media (max-width: 480px) {
    .pse-mobile-shrink.pse-bp-480 .pse-tab {
        padding: 8px 12px !important;
        font-size: 0.85em !important;
    }
    .pse-mobile-shrink.pse-bp-480 .pse-icon {
        width: 16px !important;
        height: 16px !important;
        font-size: 16px !important;
    }
}
@media (max-width: 600px) {
    .pse-mobile-shrink.pse-bp-600 .pse-tab {
        padding: 8px 12px !important;
        font-size: 0.85em !important;
    }
    .pse-mobile-shrink.pse-bp-600 .pse-icon {
        width: 16px !important;
        height: 16px !important;
        font-size: 16px !important;
    }
}
@media (max-width: 768px) {
    .pse-mobile-shrink.pse-bp-768 .pse-tab {
        padding: 8px 12px !important;
        font-size: 0.85em !important;
    }
    .pse-mobile-shrink.pse-bp-768 .pse-icon {
        width: 16px !important;
        height: 16px !important;
        font-size: 16px !important;
    }
}
@media (max-width: 1024px) {
    .pse-mobile-shrink.pse-bp-1024 .pse-tab {
        padding: 8px 12px !important;
        font-size: 0.85em !important;
    }
    .pse-mobile-shrink.pse-bp-1024 .pse-icon {
        width: 16px !important;
        height: 16px !important;
        font-size: 16px !important;
    }
}
