/* ==========================================================================
   Modal Component Styles
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.modal-close:hover {
  background: var(--border);
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
}

.form-submit {
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.form-submit:hover {
  background: #000;
}

.form-submit:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

/* ==========================================================================
   Success & Error Messages
   ========================================================================== */

.form-message {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.form-message.success {
  background: #10b981;
  color: white;
}

.form-message.error {
  background: #ef4444;
  color: white;
}

/* ==========================================================================
   Responsive Modal
   ========================================================================== */

@media (max-width: 768px) {
  .modal-content {
    padding: 24px;
    margin: 16px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .form-submit {
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 20px;
    margin: 12px;
  }
  
  .modal-header {
    margin-bottom: 20px;
  }
  
  .form-group {
    margin-bottom: 12px;
  }
}
