/**
 * dailybuddy Toggle Widget Styles
 */

/* ==========================================================================
   Base Container
   ========================================================================== */

.dailybuddy-toggle-container {
    position: relative;
    width: 100%;
}

.dailybuddy-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dailybuddy-toggle-switcher {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.dailybuddy-toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.dailybuddy-toggle-content-wrap {
    width: 100%;
    position: relative;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
}

.dailybuddy-toggle-primary-wrap,
.dailybuddy-toggle-secondary-wrap {
    display: none;
    animation: fadeIn 0.4s ease;
}

.dailybuddy-toggle-primary-wrap.dailybuddy-toggle-active,
.dailybuddy-toggle-secondary-wrap.dailybuddy-toggle-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   DEFAULT STYLE - Classic Toggle Switch
   ========================================================================== */

.toggle-style-default .dailybuddy-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-style-default .dailybuddy-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-style-default .dailybuddy-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-style-default .dailybuddy-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-style-default .dailybuddy-toggle-input:checked + .dailybuddy-toggle-slider {
    background-color: #2196F3;
}

.toggle-style-default .dailybuddy-toggle-input:checked + .dailybuddy-toggle-slider:before {
    transform: translateX(30px);
}

/* ==========================================================================
   GLOSSY STYLE - Liquid Glass Effect
   ========================================================================== */

.toggle-style-glossy .dailybuddy-glossy-switcher {
    position: relative;
    display: flex;
    gap: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 4px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.toggle-style-glossy .dailybuddy-glossy-option {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toggle-style-glossy .dailybuddy-glossy-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-style-glossy .dailybuddy-glossy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 2;
}

.toggle-style-glossy .dailybuddy-glossy-input:checked + .dailybuddy-glossy-icon {
    color: #fff;
    transform: scale(1.2);
}

.toggle-style-glossy .dailybuddy-glossy-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    box-shadow: 0 4px 15px 0 rgba(102, 126, 234, 0.75);
}

.toggle-style-glossy .dailybuddy-glossy-input:checked ~ .dailybuddy-glossy-option::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Glossy liquid effect animation */
.toggle-style-glossy .dailybuddy-glossy-option::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toggle-style-glossy .dailybuddy-glossy-option:hover::after {
    opacity: 1;
    animation: liquidGlow 2s ease-in-out infinite;
}

@keyframes liquidGlow {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

/* ==========================================================================
   GRASSHOPPER STYLE - Crystalmorphism Effect
   ========================================================================== */

.toggle-style-grasshopper .dailybuddy-grasshopper-switcher {
    position: relative;
    display: inline-flex;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.toggle-style-grasshopper .dailybuddy-grasshopper-input {
    display: none;
}

.toggle-style-grasshopper .dailybuddy-grasshopper-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    gap: 8px;
}

.toggle-style-grasshopper .dailybuddy-grasshopper-button i,
.toggle-style-grasshopper .dailybuddy-grasshopper-button svg {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.toggle-style-grasshopper .dailybuddy-grasshopper-button .dailybuddy-toggle-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
}

.toggle-style-grasshopper .dailybuddy-grasshopper-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
}

/* Crystal effect */
.toggle-style-grasshopper .dailybuddy-grasshopper-slider::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 50px;
    opacity: 0.5;
}

.toggle-style-grasshopper .dailybuddy-grasshopper-input:nth-of-type(2):checked ~ .dailybuddy-grasshopper-slider {
    left: calc(50%);
}

.toggle-style-grasshopper .dailybuddy-grasshopper-input:checked + .dailybuddy-grasshopper-button i,
.toggle-style-grasshopper .dailybuddy-grasshopper-input:checked + .dailybuddy-grasshopper-button svg {
    color: #fff;
    transform: scale(1.1);
}

.toggle-style-grasshopper .dailybuddy-grasshopper-input:checked + .dailybuddy-grasshopper-button .dailybuddy-toggle-label {
    color: #fff;
}

/* Crystalline shimmer effect */
@keyframes crystallineShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.toggle-style-grasshopper .dailybuddy-grasshopper-switcher::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    border-radius: 50px;
    animation: crystallineShimmer 3s ease-in-out infinite;
    pointer-events: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
    .dailybuddy-toggle-switcher {
        gap: 10px;
    }

    .dailybuddy-toggle-label {
        font-size: 14px;
    }

    .dailybuddy-toggle-content-wrap {
        padding: 20px;
    }

    .toggle-style-glossy .dailybuddy-glossy-option,
    .toggle-style-glossy .dailybuddy-glossy-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .toggle-style-grasshopper .dailybuddy-grasshopper-button {
        padding: 12px 20px;
    }

    .toggle-style-grasshopper .dailybuddy-grasshopper-button i,
    .toggle-style-grasshopper .dailybuddy-grasshopper-button svg {
        font-size: 20px;
    }

    .toggle-style-grasshopper .dailybuddy-grasshopper-button .dailybuddy-toggle-label {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .dailybuddy-toggle-switcher {
        flex-wrap: wrap;
        justify-content: center;
    }

    .toggle-style-default .dailybuddy-toggle-switch {
        width: 50px;
        height: 25px;
    }

    .toggle-style-default .dailybuddy-toggle-slider:before {
        height: 18px;
        width: 18px;
    }

    .toggle-style-default .dailybuddy-toggle-input:checked + .dailybuddy-toggle-slider:before {
        transform: translateX(25px);
    }
}

/* ==========================================================================
   Elementor Editor Compatibility
   ========================================================================== */

.elementor-editor-active .dailybuddy-toggle-primary-wrap {
    display: block !important;
}

.elementor-editor-active .dailybuddy-toggle-secondary-wrap {
    display: none !important;
}
