/*--------------------------------------------------------------
Color Switcher Personalizable - Mejorado para Desktop y Móvil
--------------------------------------------------------------*/

/* Estilos base del color switcher */
.color-switcher-wrap {
    z-index: 99999 !important;
}

.color-switcher-wrap .color-switcher-item {
    position: fixed;
    left: -170px;
    top: 250px;
    width: 170px;
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.15);
    background: #fff;
    z-index: 99999;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 15px;
    padding-bottom: 10px;
    text-align: center;
    border-bottom-right-radius: 20px;
    border-top-right-radius: 20px;
    padding-top: 10px;
    opacity: 0.95;
}

.color-switcher-wrap .color-switcher-item.color-switcher-open {
    left: 0px;
    opacity: 1;
}

.color-switcher-wrap .color-switcher-item .color-toggle-btn {
    position: absolute;
    right: -50px;
    top: 0px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: #fff;
    box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.12);
    text-align: center;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 99999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-switcher-wrap .color-switcher-item .color-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);
}

.color-switcher-wrap .color-switcher-item .color-toggle-btn i {
    font-size: 24px;
    color: #333;
    animation: rotate 8s infinite linear;
    transition: color 0.3s ease;
}

.color-switcher-wrap .color-switcher-item .color-toggle-btn:hover i {
    color: #657150;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.color-switcher-wrap .color-switcher-item ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.color-switcher-wrap .color-switcher-item ul li.btn {
    width: 35px;
    height: 28px;
    background: #657150;
    margin: 4px;
    position: relative;
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-switcher-wrap .color-switcher-item ul li.btn:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-switcher-wrap .color-switcher-item ul li.btn.active {
    border-color: #333;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333, 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.color-switcher-wrap .color-switcher-item ul li.btn.active:before {
    position: absolute;
    left: 50%;
    top: 50%;
    color: #fff;
    content: "✓";
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Colores específicos */
.color-switcher-wrap .color-switcher-item ul li.btn.btn1 { background: #657150; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn2 { background: #835845; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn3 { background: #1e8267; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn4 { background: #de5ca2; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn5 { background: #d9ba91; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn6 { background: #99337f; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn7 { background: #18A7B5; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn8 { background: #668c25; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn9 { background: #ff8051; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn10 { background: #dd6673; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn11 { background: #d58675; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn12 { background: #b19a56; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn13 { background: #db7d37; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn14 { background: #699b9b; }
.color-switcher-wrap .color-switcher-item ul li.btn.btn15 { background: #ea6e53; }

/* Estilos para móvil mejorados */
@media (max-width: 767px) {
    .color-switcher-wrap .color-switcher-item {
        left: -140px;
        top: 180px;
        width: 140px;
        padding: 12px 8px;
    }
    
    .color-switcher-wrap .color-switcher-item .color-toggle-btn {
        right: -45px;
        width: 45px;
        height: 45px;
        line-height: 45px;
    }
    
    .color-switcher-wrap .color-switcher-item .color-toggle-btn i {
        font-size: 20px;
    }
    
    .color-switcher-wrap .color-switcher-item ul li.btn {
        width: 28px;
        height: 22px;
        margin: 2px;
        border-radius: 4px;
    }
    
    .color-switcher-wrap .color-switcher-item ul li.btn.active:before {
        font-size: 12px;
    }
}

/* Estilos para tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .color-switcher-wrap .color-switcher-item {
        left: -160px;
        top: 200px;
        width: 160px;
        padding: 14px 10px;
    }
    
    .color-switcher-wrap .color-switcher-item .color-toggle-btn {
        right: -48px;
        width: 48px;
        height: 48px;
        line-height: 48px;
    }
    
    .color-switcher-wrap .color-switcher-item .color-toggle-btn i {
        font-size: 22px;
    }
    
    .color-switcher-wrap .color-switcher-item ul li.btn {
        width: 32px;
        height: 25px;
        margin: 3px;
    }
}

/* Mejoras para pantallas grandes */
@media (min-width: 1200px) {
    .color-switcher-wrap .color-switcher-item {
        left: -180px;
        width: 180px;
        padding: 18px 12px;
    }
    
    .color-switcher-wrap .color-switcher-item .color-toggle-btn {
        right: -55px;
        width: 55px;
        height: 55px;
        line-height: 55px;
    }
    
    .color-switcher-wrap .color-switcher-item .color-toggle-btn i {
        font-size: 28px;
    }
    
    .color-switcher-wrap .color-switcher-item ul li.btn {
        width: 38px;
        height: 30px;
        margin: 5px;
    }
}

/* Asegurar que esté siempre visible y funcional */
.color-switcher-wrap {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
