/* --- Modal Animations --- */
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.9) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalPopOut {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.9) translateY(10px); }
}

/* --- Modal Core Structure --- */
.config-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(2px);
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.config-content {
  background: var(--bg-primary, #fff);
  max-width: 900px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 8px; /* Added radius */
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  animation: modalPop 0.5s cubic-bezier(.04,.51,.05,1.09) forwards;
}

.config-content.closing {
  animation: modalPopOut 0.28s cubic-bezier(.4,0,.2,1) forwards;
}

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  background: var(--bg-secondary, #f8f9fa);
}

.config-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-primary, inherit);
  opacity: 0.6;
  padding: 0;
}

.close-button:hover {
  opacity: 1;
}

.config-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 80vh;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
  .config-content {
    max-height: 85vh;
    width: 95%;
  }
  
  .config-body {
    padding: 1rem;
  }
}
