/* Microlesson Video Submission Modal Styles */
/* Extends the base modal styles from gg_group module */

/* Generic modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  padding: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
  overflow: hidden;
}

.modal-content h2 {
  margin: 0 0 24px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  padding: 24px 24px 0;
}

.close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.close-modal:hover {
  background: #f3f4f6;
  color: #333;
}

/* Form styles */
#submit-video-form {
  padding: 0 24px 24px;
}

.form-item {
  margin-bottom: 20px;
}

.form-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-item label .required {
  color: #dc2626;
}

.form-item input[type="text"],
.form-item input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.2s;
}

.form-item input:focus {
  outline: none;
  border-color: #7d11ff;
  box-shadow: 0 0 0 3px rgba(125, 17, 255, 0.1);
}

.field-description {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

/* Song selection styles */
#song-selection-container {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.select-song-btn,
.change-song-btn {
  background: #7d11ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.select-song-btn:hover,
.change-song-btn:hover {
  background: #5a0fb8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(125, 17, 255, 0.3);
}

.selected-song {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selected-song .song-title {
  font-weight: 600;
  color: #333;
  flex: 1;
}

.change-song-btn {
  font-size: 13px;
  padding: 6px 12px;
}

/* Form errors */
.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
}

.form-errors .error-message {
  color: #dc2626;
  font-size: 14px;
  margin-bottom: 8px;
}

.form-errors .error-message:last-child {
  margin-bottom: 0;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #7d11ff;
  color: white;
}

.btn-primary:hover {
  background: #5a0fb8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(125, 17, 255, 0.3);
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #e5e7eb;
  color: #333;
}

.btn-secondary:hover {
  background: #d1d5db;
}

/* Song selection modal */
.song-list-container {
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.loading {
  text-align: center;
  color: #666;
  padding: 40px 0;
}

.song-selection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  transition: all 0.2s;
}

.song-item:hover {
  background: #f3f4f6;
  border-color: #7d11ff;
  box-shadow: 0 2px 8px rgba(125, 17, 255, 0.1);
}

.song-info {
  flex: 1;
}

.song-info .song-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.select-this-song {
  background: #7d11ff;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.select-this-song:hover {
  background: #5a0fb8;
}

.no-songs-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.no-songs-message p {
  margin-bottom: 12px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}