/* Shared modal styles used by groups and microlessons */

/* Modal overlay styles */
.gg-modal-overlay {
  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;
}

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

/* Modal container */
.gg-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
}

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

/* Modal header */
.gg-modal-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.gg-modal-close {
  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;
}

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

/* Modal body */
.gg-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

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

/* Modal footer */
.gg-modal-footer {
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

.song-selection-item {
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 8px;
  transition: all 0.2s;
}

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

.song-selection-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Only override what's needed for modal context */
.song-selection-item .song-short-row {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  width: 100%;
}

.song-selection-item .song-short-row-content {
  flex: 1;
  width: 100%;
}

/* Keep play button visible in selection context for preview */
.song-selection-item .play-button {
  /* Play button remains visible and functional */
}

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

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

.select-song-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(125, 17, 255, 0.2);
}

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

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

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

.no-songs-message p:last-child {
  margin: 0;
}

/* Error message */
.error-message {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  padding: 16px;
  color: #c00;
  text-align: center;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .gg-modal {
    width: 95%;
    max-height: 90vh;
    margin: 20px;
  }
  
  .gg-modal-header {
    padding: 16px;
  }
  
  .gg-modal-body {
    padding: 16px;
  }
  
  .gg-modal-footer {
    padding: 16px;
  }
  
  .song-selection-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .select-song-btn {
    width: 100%;
    margin-top: 8px;
  }
}