/* Sistema de alertas completamente reescrito */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.custom-alert-box {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-family: 'Arial', sans-serif;
    animation: alertSlideIn 0.3s ease-out;
}

.custom-alert-box.error {
    border-left: 5px solid #e74c3c;
    background: linear-gradient(135deg, #ffffff 0%, #ffeaea 100%);
}

.custom-alert-box.success {
    border-left: 5px solid #27ae60;
    background: linear-gradient(135deg, #ffffff 0%, #eafaf1 100%);
}

.custom-alert-box.warning {
    border-left: 5px solid #f39c12;
    background: linear-gradient(135deg, #ffffff 0%, #fef9e7 100%);
}

.custom-alert-box.info {
    border-left: 5px solid #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #ebf3fd 100%);
}

.custom-alert-message {
    font-size: 16px;
    line-height: 1.5;
    color: #2c3e50;
    margin-bottom: 0;
    padding-right: 30px;
}

.custom-alert-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.custom-alert-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

.custom-alert-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.custom-alert-box.error .custom-alert-icon {
    color: #e74c3c;
}

.custom-alert-box.success .custom-alert-icon {
    color: #27ae60;
}

.custom-alert-box.warning .custom-alert-icon {
    color: #f39c12;
}

.custom-alert-box.info .custom-alert-icon {
    color: #3498db;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes alertSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .custom-alert-box {
        margin: 10px;
        padding: 25px;
        max-width: 90vw;
    }
    
    .custom-alert-message {
        font-size: 14px;
        padding-right: 25px;
    }
    
    .custom-alert-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
}

/* Eliminar estilos conflictivos anteriores */
#alerts-modal {
    display: none !important;
}

.alert-center {
    display: none !important;
}

.alert-danger,
.alert-success,
.alert-warning,
.alert-info {
    display: none !important;
}

/*pantalla de carga*/
#loading {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 9999;
}

.loader {
  transform: rotateZ(315deg);
  perspective: 1000px;
  border-radius: 50%;
  width: 88px;
  height: 88px;
  color: #fff;
  position: relative;
}

.loader:before,
.loader:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: inherit;
  height: inherit;
  border-radius: 50%;
  transform: rotateX(70deg);
  animation: 1s spin linear infinite;
  filter: drop-shadow(1px 1px 5px var(--greenFull3));
}

.loader:after {
  color: var(--greenFull3);
  transform: rotateY(70deg);
  animation-delay: 0.4s;
  filter: drop-shadow(1px 1px 5px var(--greenFull3));
}

@keyframes spin {
  0%,
  100% {
    box-shadow: 0.2em 0px 0 0px currentcolor;
  }
  12% {
    box-shadow: 0.2em 0.2em 0 0 currentcolor;
  }
  25% {
    box-shadow: 0 0.2em 0 0px currentcolor;
  }
  37% {
    box-shadow: -0.2em 0.2em 0 0 currentcolor;
  }
  50% {
    box-shadow: -0.2em 0 0 0 currentcolor;
  }
  62% {
    box-shadow: -0.2em -0.2em 0 0 currentcolor;
  }
  75% {
    box-shadow: 0px -0.2em 0 0 currentcolor;
  }
  87% {
    box-shadow: 0.2em -0.2em 0 0 currentcolor;
  }
}