/* Contenedor principal - Fondo transparente con efecto vidrio */
.cmp-wrapper {
    max-width: 620px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(113, 81, 66, 0.15); /* Color #715142 con 15% de opacidad */
    border-radius: 12px;
    box-shadow: 
        0 0 10px rgba(113, 81, 66, 0.15), /* Brillo sutil con el color */
        0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid rgba(113, 81, 66, 0.25);
    position: relative;
    backdrop-filter: blur(10px); /* Efecto de vidrio más pronunciado */
    -webkit-backdrop-filter: blur(10px);
}

/* Efecto de borde sutil con el color */
.cmp-wrapper:before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 13px;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(113, 81, 66, 0.1), 
        transparent);
    z-index: -1;
}

/* Título del calendario - color #715142 */
.cmp-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #715142; /* Color solicitado */
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(113, 81, 66, 0.3);
}

/* Estilo del datepicker - fondo más transparente */
#cmp-calendario .ui-datepicker {
    width: 100% !important;
    padding: 15px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(113, 81, 66, 0.25) !important;
    background: rgba(113, 81, 66, 0.1); /* Muy transparente */
    font-size: 0.95rem !important;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 0 10px rgba(113, 81, 66, 0.05);
    color: #715142 !important; /* Color del texto */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Cabecera del calendario - fondo con transparencia */
.ui-datepicker-header {
    background: linear-gradient(135deg, 
        rgba(113, 81, 66, 0.2), 
        rgba(113, 81, 66, 0.15)) !important;
    color: #715142 !important; /* Color del texto */
    padding: 10px !important;
    border-radius: 6px !important;
    font-weight: 600;
    border: 1px solid rgba(113, 81, 66, 0.2) !important;
    margin-bottom: 12px;
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Botones de navegación */
.ui-datepicker-prev, .ui-datepicker-next {
    cursor: pointer !important;
    opacity: 0.9;
    transition: opacity 0.2s;
    color: #715142 !important; /* Color del texto */
}

.ui-datepicker-prev:hover, .ui-datepicker-next:hover {
    opacity: 1;
    background: rgba(113, 81, 66, 0.1) !important;
}

.ui-datepicker-prev:before {
    content: "←";
    font-weight: bold;
    color: #715142; /* Color del texto */
    font-size: 16px;
}

.ui-datepicker-next:before {
    content: "→";
    font-weight: bold;
    color: #715142; /* Color del texto */
    font-size: 16px;
}

.ui-datepicker-prev span, .ui-datepicker-next span {
    display: none !important;
}

/* Días de la semana */
.ui-datepicker th {
    color: #715142; /* Color del texto */
    font-weight: 600;
    padding: 8px 0 !important;
    background: rgba(113, 81, 66, 0.1);
    border-radius: 3px;
    margin: 1px;
    font-size: 0.9rem;
    border: 1px solid rgba(113, 81, 66, 0.15);
}

/* Mes actual */
.ui-datepicker-title {
    color: #715142 !important; /* Color del texto */
    font-size: 1.1rem;
}

/* Celda de fecha */
.ui-state-default {
    border: 1px solid rgba(113, 81, 66, 0.2) !important;
    border-radius: 6px !important;
    padding: 8px !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(113, 81, 66, 0.08) !important; /* Muy transparente */
    color: #715142 !important; /* Color del texto */
    font-weight: 500;
    margin: 2px !important;
    font-size: 0.9rem;
}

.ui-state-default:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.15),
        0 0 8px rgba(113, 81, 66, 0.1);
    background: rgba(113, 81, 66, 0.15) !important; /* Más visible al hover */
}

/* Fecha disponible */
.cmp-disponible .ui-state-default {
    background: rgba(113, 81, 66, 0.12) !important;
    color: #715142 !important; /* Color del texto */
    border-color: rgba(113, 81, 66, 0.25) !important;
}

.cmp-disponible .ui-state-default:hover {
    background: rgba(113, 81, 66, 0.2) !important;
    color: #5a4032 !important; /* Color un poco más oscuro al hover */
    border-color: rgba(113, 81, 66, 0.35) !important;
}

/* Fecha ocupada - rojo pero con transparencia */
.cmp-ocupado .ui-state-default {
    background: rgba(192, 57, 43, 0.8) !important;
    color: white !important; /* Texto blanco para contraste */
    border-color: rgba(231, 76, 60, 0.6) !important;
    font-weight: 600;
}

.cmp-ocupado .ui-state-default:hover {
    background: rgba(231, 76, 60, 0.85) !important;
    border-color: rgba(255, 107, 74, 0.7) !important;
    box-shadow: 
        0 0 8px rgba(231, 76, 60, 0.3),
        0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Fecha seleccionada/hoy - verde con transparencia */
.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-highlight {
    background: rgba(39, 174, 96, 0.8) !important;
    color: white !important; /* Texto blanco para contraste */
    font-weight: bold;
    border-color: rgba(46, 204, 113, 0.6) !important;
    box-shadow: 
        0 2px 8px rgba(46, 204, 113, 0.25);
}

/* Leyenda */
.cmp-leyenda {
    margin-top: 20px;
    padding: 12px;
    background: rgba(113, 81, 66, 0.1);
    border-radius: 8px;
    display: inline-flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(113, 81, 66, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.cmp-leyenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #715142; /* Color del texto */
}

.cmp-leyenda span {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(113, 81, 66, 0.3);
}

.cmp-leyenda .disp {
    background: rgba(113, 81, 66, 0.2);
}

.cmp-leyenda .ocup {
    background: rgba(192, 57, 43, 0.8);
}

/* Mensaje de autor */
.cmp-autor-message {
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(113, 81, 66, 0.15);
    border: 1px solid rgba(113, 81, 66, 0.25);
    border-radius: 6px;
    color: #715142; /* Color del texto */
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Estadísticas */
.cmp-stats {
    margin-top: 20px;
    padding: 12px;
    background: rgba(113, 81, 66, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: #715142; /* Color del texto */
    border: 1px solid rgba(113, 81, 66, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.cmp-stats strong {
    color: #5a4032; /* Color un poco más oscuro para énfasis */
}

/* Botón de recarga */
.cmp-reload-btn {
    margin-top: 12px;
    padding: 8px 16px !important;
    background: rgba(113, 81, 66, 0.15) !important;
    color: #715142 !important; /* Color del texto */
    border: 1px solid rgba(113, 81, 66, 0.25) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.cmp-reload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(113, 81, 66, 0.25) !important;
    color: #5a4032 !important;
}

/* ============================================
   RESPONSIVE PARA CELULAR
   ============================================ */
@media (max-width: 768px) {
    /* Contenedor principal para móvil */
    .cmp-wrapper {
        max-width: 100%;
        margin: 10px;
        padding: 15px;
        border-radius: 10px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    /* Título más pequeño */
    .cmp-title {
        font-size: 20px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        color: #715142; /* Mantener color */
    }
    
    /* Calendario para móvil */
    #cmp-calendario .ui-datepicker {
        padding: 10px !important;
        border-radius: 8px !important;
        font-size: 0.85rem !important;
        color: #715142 !important; /* Mantener color */
    }
    
    /* Cabecera del calendario móvil */
    .ui-datepicker-header {
        padding: 8px !important;
        margin-bottom: 10px;
        font-size: 0.9rem;
        color: #715142 !important; /* Mantener color */
    }
    
    /* Botones de navegación móvil */
    .ui-datepicker-prev:before {
        font-size: 14px;
        color: #715142; /* Mantener color */
    }
    
    .ui-datepicker-next:before {
        font-size: 14px;
        color: #715142; /* Mantener color */
    }
    
    /* Días de la semana móvil */
    .ui-datepicker th {
        padding: 6px 0 !important;
        font-size: 0.8rem;
        color: #715142; /* Mantener color */
    }
    
    /* Celdas de fecha móvil */
    .ui-state-default {
        padding: 6px 4px !important;
        margin: 1px !important;
        font-size: 0.8rem;
        border-radius: 4px !important;
        color: #715142 !important; /* Mantener color */
    }
    
    /* Leyenda en columna para móvil */
    .cmp-leyenda {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        margin-top: 15px;
    }
    
    .cmp-leyenda-item {
        font-size: 13px;
        color: #715142; /* Mantener color */
    }
    
    .cmp-leyenda span {
        width: 14px;
        height: 14px;
    }
    
    /* Mensaje de autor móvil */
    .cmp-autor-message {
        margin: 10px 0;
        padding: 8px 12px;
        font-size: 13px;
        text-align: left;
        display: block;
        color: #715142; /* Mantener color */
    }
    
    /* Estadísticas móvil */
    .cmp-stats {
        margin-top: 15px;
        padding: 10px;
        font-size: 12px;
        color: #715142; /* Mantener color */
    }
    
    .cmp-stats strong {
        color: #5a4032; /* Mantener color */
    }
    
    /* Botón móvil */
    .cmp-reload-btn {
        padding: 6px 12px !important;
        font-size: 12px;
        margin-top: 10px;
        width: 100%;
        color: #715142 !important; /* Mantener color */
    }
}

/* Para pantallas muy pequeñas (menos de 480px) */
@media (max-width: 480px) {
    .cmp-wrapper {
        margin: 5px;
        padding: 12px;
    }
    
    .cmp-title {
        font-size: 18px;
        color: #715142; /* Mantener color */
    }
    
    #cmp-calendario .ui-datepicker {
        padding: 8px !important;
    }
    
    .ui-datepicker-title {
        font-size: 1rem;
        color: #715142 !important; /* Mantener color */
    }
    
    .ui-state-default {
        padding: 5px 3px !important;
        font-size: 0.75rem;
        color: #715142 !important; /* Mantener color */
    }
    
    .cmp-leyenda-item {
        font-size: 12px;
        color: #715142; /* Mantener color */
    }
    
    .cmp-autor-message {
        font-size: 12px;
        padding: 6px 10px;
        color: #715142; /* Mantener color */
    }
    
    .cmp-stats {
        font-size: 11px;
        padding: 8px;
        color: #715142; /* Mantener color */
    }
}

/* Para tablets (entre 769px y 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cmp-wrapper {
        max-width: 90%;
        margin: 15px auto;
    }
}

/* Efecto de pulso para fechas recién modificadas */
@keyframes pulse-modified {
    0% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.03);
    }
    100% { 
        transform: scale(1);
    }
}

.cmp-pulse {
    animation: pulse-modified 0.4s ease-in-out 2;
}

/* Ajuste para días de otros meses */
.ui-datepicker .ui-datepicker-unselectable .ui-state-default {
    background: rgba(113, 81, 66, 0.05) !important;
    color: rgba(113, 81, 66, 0.4) !important;
    cursor: default;
}

.ui-datepicker .ui-datepicker-unselectable .ui-state-default:hover {
    transform: none;
    box-shadow: none;
    background: rgba(113, 81, 66, 0.05) !important;
}