/* ============================================
   CURSOR HEADER CART SIDEBAR STYLES
   Estilos para el sidebar del carrito
   Prefijo: cursorheader_cartsidebar_
   ============================================ */

/* Contenedor principal del sidebar del carrito */
#customMenuLateralCarro.md-sidenav-rightCarro.cdz-sidebarCarro {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 9999999;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
}

#customMenuLateralCarro.md-sidenav-rightCarro.cdz-sidebarCarro.active {
    transform: translateX(0);
}

/* Botón de cerrar */
.cursorheader_cartsidebar_close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f8f9fa;
    border: 2px solid #ebebeb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #707070;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cursorheader_cartsidebar_close:hover {
    background: #E0261C;
    border-color: #E0261C;
    color: #ffffff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(224, 38, 28, 0.3);
}

.cursorheader_cartsidebar_close span {
    color: inherit;
    font-weight: 600;
}

/* Contenedor del contenido */
.cursorheader_cartsidebar_content {
    padding: 60px 30px 30px;
    background: #ffffff;
    color: #1d1d1d;
}

/* Estilos para el contenido dinámico dentro del sidebar */
#DivContentCarritoSeidebar {
    background: #ffffff !important;
    color: #1d1d1d !important;
    min-height: 200px;
}

/* Solo aplicar color a elementos que no tengan color específico */
#DivContentCarritoSeidebar > div {
    background: #ffffff !important;
}

#DivContentCarritoSeidebar .card,
#DivContentCarritoSeidebar .product-card,
#DivContentCarritoSeidebar .alert {
    background: #ffffff !important;
    color: #1d1d1d !important;
}

/* Texto por defecto */
#DivContentCarritoSeidebar p:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
#DivContentCarritoSeidebar span:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
#DivContentCarritoSeidebar label:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
#DivContentCarritoSeidebar div:not(.alert):not(.text-success):not(.text-danger) {
    color: #1d1d1d !important;
}

#DivContentCarritoSeidebar h1,
#DivContentCarritoSeidebar h2,
#DivContentCarritoSeidebar h3,
#DivContentCarritoSeidebar h4,
#DivContentCarritoSeidebar h5,
#DivContentCarritoSeidebar h6 {
    color: #1d1d1d !important;
}

/* Links */
#DivContentCarritoSeidebar a {
    color: #E0261C !important;
}

#DivContentCarritoSeidebar a:hover {
    color: #c8231a !important;
}

/* Header del carrito */
.cursorheader_cartsidebar_header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #ebebeb;
    margin-bottom: 25px;
}

.cursorheader_cartsidebar_title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cursorheader_cartsidebar_title i {
    color: #E0261C;
}

/* Overlay de fondo */
.cursorheader_cartsidebar_overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursorheader_cartsidebar_overlay.show {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 767px) {
    #customMenuLateralCarro.md-sidenav-rightCarro.cdz-sidebarCarro {
        width: 100%;
        max-width: 100%;
        background: #ffffff !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    .cursorheader_cartsidebar_content {
        padding: 60px 20px 30px;
        background: #ffffff !important;
        color: #1d1d1d !important;
    }
    
    .cursorheader_cartsidebar_header {
        background: #ffffff !important;
        border-bottom: 2px solid #ebebeb !important;
    }
    
    .cursorheader_cartsidebar_title {
        color: #1d1d1d !important;
    }
    
    /* Asegurar que el contenido interno tenga estilos */
    #customMenuLateralCarro.md-sidenav-rightCarro.cdz-sidebarCarro,
    #customMenuLateralCarro.md-sidenav-rightCarro.cdz-sidebarCarro * {
        background: #ffffff !important;
        color: #1d1d1d !important;
    }
    
    /* Asegurar que los elementos dentro del sidebar tengan fondo blanco */
    #customMenuLateralCarro.md-sidenav-rightCarro.cdz-sidebarCarro > * {
        background: #ffffff !important;
    }
    
    /* Estilos específicos para el contenido del carrito en móvil */
    #DivContentCarritoSeidebar {
        background: #ffffff !important;
        color: #1d1d1d !important;
        min-height: 200px;
    }
    
    /* Solo aplicar fondo blanco a contenedores principales */
    #DivContentCarritoSeidebar > div,
    #DivContentCarritoSeidebar > table,
    #DivContentCarritoSeidebar .card,
    #DivContentCarritoSeidebar .product-card {
        background: #ffffff !important;
    }
    
    /* Texto por defecto, pero respetar clases de color */
    #DivContentCarritoSeidebar p:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(.text-primary),
    #DivContentCarritoSeidebar span:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(.text-primary),
    #DivContentCarritoSeidebar label:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(.text-primary),
    #DivContentCarritoSeidebar td:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(.text-primary),
    #DivContentCarritoSeidebar th:not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(.text-primary) {
        color: #1d1d1d !important;
    }
    
    #DivContentCarritoSeidebar h1,
    #DivContentCarritoSeidebar h2,
    #DivContentCarritoSeidebar h3,
    #DivContentCarritoSeidebar h4,
    #DivContentCarritoSeidebar h5,
    #DivContentCarritoSeidebar h6 {
        color: #1d1d1d !important;
    }
    
    #DivContentCarritoSeidebar a:not(.btn) {
        color: #E0261C !important;
    }
    
    #DivContentCarritoSeidebar a:not(.btn):hover {
        color: #c8231a !important;
    }
    
    #DivContentCarritoSeidebar button:not(.btn-secondary):not(.btn-outline),
    #DivContentCarritoSeidebar .btn:not(.btn-secondary):not(.btn-outline):not(.btn-link) {
        background: #E0261C !important;
        color: #ffffff !important;
        border-color: #E0261C !important;
    }
    
    #DivContentCarritoSeidebar button:not(.btn-secondary):not(.btn-outline):hover,
    #DivContentCarritoSeidebar .btn:not(.btn-secondary):not(.btn-outline):not(.btn-link):hover {
        background: #c8231a !important;
        border-color: #c8231a !important;
    }
    
    /* Asegurar que las tablas se vean correctamente */
    #DivContentCarritoSeidebar table {
        background: #ffffff !important;
        color: #1d1d1d !important;
    }
    
    #DivContentCarritoSeidebar table td,
    #DivContentCarritoSeidebar table th {
        background: transparent !important;
        border-color: #ebebeb !important;
    }
}

