/* 
      ============================================= MODAL DRAWER OVERLAY =============================================
*/

/* Overlay de fondo */
.modal-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.modal-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Drawer */
.modal-drawer {
  position: fixed;
  top: 0;
  right: -350px; /* Inicialmente oculto fuera de la pantalla */
  width: 320px;
  height: 100vh;
  background-color: var(--white-color);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
}

.modal-drawer.active {
  right: 0; /* Desliza hacia adentro */
}

/* Header del Drawer */
.modal-drawer-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--gray-color-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-drawer-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-color-900);
}

.modal-drawer-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--gray-color-500);
  transition: color 0.2s ease;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-drawer-close:hover {
  color: var(--gray-color-900);
  background-color: var(--gray-color-100);
}

.modal-drawer-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Contenido del Drawer */
.modal-drawer-content {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

/* Navegación */
.modal-drawer-nav {
  flex: 1;
}

.modal-drawer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modal-drawer-nav-item {
  margin-bottom: 0.25rem;
}

.modal-drawer-nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--gray-color-700);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.modal-drawer-nav-link:hover {
  background-color: var(--gray-color-50);
  color: var(--primary-color-500);
  text-decoration: none;
  border-left-color: var(--primary-color-500);
  cursor: pointer;
}

.modal-drawer-nav-link.active {
  background-color: var(--primary-color-50);
  color: var(--primary-color-500);
  border-left-color: var(--primary-color-500);
}

.modal-drawer-nav-link svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Footer del Drawer */
.modal-drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--gray-color-200);
  background-color: var(--gray-color-50);
  margin-top: auto;
}

.modal-drawer-social h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-color-900);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.modal-drawer-social-links {
  display: flex;
  gap: 0.75rem;
}

.modal-drawer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--white-color);
  color: var(--gray-color-500);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.modal-drawer-social-link:hover {
  color: var(--primary-color-500);
  background-color: var(--primary-color-50);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Botón trigger personalizado */
.modal-drawer-trigger {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--gray-color-700);
  transition: color 0.2s ease;
}

.modal-drawer-trigger:hover {
  color: var(--primary-color-500);
}

.modal-drawer-trigger:focus {
  outline: none;
  color: var(--primary-color-500);
}

/* Responsive */
@media (min-width: 768px) {
  .modal-drawer {
    width: 350px;
    right: -370px;
  }
}

/* Prevenir scroll cuando el modal está abierto */
body.modal-drawer-open {
  overflow: hidden;
}