/* Modal Background */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Modal Window */
.modal-container {
  background: #ffffff;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

/* Modal Header */
.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: #ff4757;
  background-color: #ffe0e3;
}

/* Modal Body */
.modal-body {
  padding: 32px;
}

/* Form Styles inside Modal */
.modal-form-group {
  margin-bottom: 20px;
}

.modal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.modal-label span {
  color: #ef4444;
}

.modal-input,
.modal-select,
.modal-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  color: #1f2937;
  transition: all 0.2s ease;
  background-color: #f9fafb;
}

.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
  outline: none;
  border-color: #467ff7;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(70, 127, 247, 0.1);
}

.modal-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Modal Footer/Button */
.modal-submit-btn {
  width: 100%;
  padding: 14px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.modal-submit-btn:hover {
  background: #1ebc57;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

.modal-submit-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Responsive */
@media (max-width: 640px) {
  .modal-container {
    width: 95%;
    margin: 10px;
    border-radius: 16px;
  }
  
  .modal-body {
    padding: 24px;
  }
}
