/* Ruffle Flash Player Modal Styles */

/* Modal backdrop */
.ruffle-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: 10000;
  animation: ruffleModalFadeIn 0.2s ease-in-out;
}

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

/* Modal content container - draggable */
.ruffle-modal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  animation: ruffleModalSlideIn 0.3s ease-out;
  position: relative;
  cursor: grab;
}

/* Draggable state */
.ruffle-modal-content.ruffle-draggable {
  position: fixed;
}

/* Fullscreen state */
.ruffle-modal-content.ruffle-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  z-index: 10001;
}

.ruffle-modal-content.ruffle-fullscreen .ruffle-modal-resize-handle {
  display: none;
}

@keyframes ruffleModalSlideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Modal header with title and close button */
.ruffle-modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f5f5f5;
  border-radius: 8px 8px 0 0;
  user-select: none;
  cursor: grab;
}

.ruffle-modal-header:active {
  cursor: grabbing;
}

.ruffle-modal-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

/* Control buttons container */
.ruffle-modal-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Fullscreen button */
.ruffle-modal-fullscreen {
  background: none;
  border: none;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ruffle-modal-fullscreen:hover {
  background-color: #e0e0e0;
  color: #000;
}

.ruffle-modal-fullscreen:active {
  background-color: #d0d0d0;
}
  background-color: #f5f5f5;
  border-radius: 8px 8px 0 0;
}

.ruffle-modal-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

/* Close button */
.ruffle-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  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 ease;
}

.ruffle-modal-close:hover {
  background-color: #e0e0e0;
  color: #000;
}

.ruffle-modal-close:active {
  background-color: #d0d0d0;
}

/* Modal body - contains the player */
.ruffle-modal-body {
  flex: 1;
  overflow: auto;
  background-color: #000;
}

/* Ruffle player inside modal */
.ruffle-modal-body object,
.ruffle-modal-body embed,
.ruffle-modal-body ruffle-player {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Modal footer */
.ruffle-modal-footer {
  padding: 8px 16px;
  border-top: 1px solid #e0e0e0;
  background-color: #f5f5f5;
  text-align: center;
  font-size: 11px;
  color: #999;
  border-radius: 0 0 8px 8px;
}

/* Resize handle - bottom right corner */
.ruffle-modal-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #999 50%);
  border-radius: 0 0 8px 0;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.ruffle-modal-resize-handle:hover {
  opacity: 1;
  background: linear-gradient(135deg, transparent 50%, #333 50%);
}

.ruffle-modal-content:hover .ruffle-modal-resize-handle {
  opacity: 0.8;
}

/* Responsive behavior for smaller screens */
@media (max-width: 768px) {
  .ruffle-modal-content {
    width: 95vw;
    height: 80vh;
    max-width: 95vw;
    max-height: 80vh;
  }
}

@media (max-width: 480px) {
  .ruffle-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .ruffle-modal-header,
  .ruffle-modal-footer {
    border-radius: 0;
  }
}

/* Inline Ruffle player styles */
ruffle-player {
  display: block;
}

.ruffle-player-container {
  position: relative;
  background-color: #000;
  display: inline-block;
}

.ruffle-player-container.responsive {
  width: 100%;
  max-width: 100%;
}

/* Fallback message styles */
.ruffle-fallback {
  padding: 20px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-align: center;
  font-size: 14px;
}

.ruffle-fallback-icon {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.5;
}
