/* Add this CSS to your stylesheet */
#speakerFilesModal {
  font-size: 12px; /* Base font size */
}

#speakerFilesModal .modal-dialog.custom-modal-size {
  max-width: 95%;
  width: 95%;
  margin: 0.5rem auto;
}

#speakerFilesModal .modal-content {
  padding: 0.5rem;
}

#speakerFilesModal .modal-body {
  padding: 0.5rem;
}

#speakerFilesModal .btn, 
#speakerFilesModal .form-control,
#speakerFilesModal .speaker-item,
#speakerFilesModal select,
#speakerFilesModal input {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  height: auto;
  line-height: 1.2;
}

#speakerFilesModal .btn {
  margin: 0.1rem;
}

#speakerFilesModal .table {
  font-size: 0.8rem;
}

#speakerFilesModal .table th,
#speakerFilesModal .table td {
  padding: 0.3rem;
}

#speakerFilesModal textarea.form-control {
  font-size: 0.8rem;
  padding: 0.3rem;
}

#speakerFilesModal .modal-footer {
  padding: 0.5rem;
}

#speakerFilesModal .modal-footer .btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  margin: 0.1rem;
}

/* Make the scroll container more compact */
#speakerFilesModal .scroll-container {
  max-height: 300px;
  margin-bottom: 0.5rem;
}

/* Adjust grid layout */
#speakerFilesModal .grid-container-speaker {
  margin-bottom: 0.5rem;
}

/* Make speaker labels smaller */
#speakerFilesModal .speaker-label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

/* Compact timeline markers */
#speakerFilesModal .timeline-marker {
  font-size: 0.7rem;
}

/* Adjust controls container */
#speakerFilesModal #idControls {
  margin: 0.3rem 0;
}

/* Make the table more compact */
#speakerFilesModal #idSpeakerTable {
  margin-bottom: 0.5rem;
}

/* Adjust the grid layout spacing */
#speakerFilesModal .grid-overall-container {
  gap: 0.5rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.panels-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.editable-panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 15px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.panel-header > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-header label {
  font-size: 0.8em;
  color: #666;
  font-weight: bold;
}

.panel-header input {
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
}

.panel-content {
  margin: 12px 0;
}

.content-edit {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
}

.panel-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.panel-controls button {
  padding: 6px 12px;
  font-size: 0.85em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.play-btn { background: #28a745; color: white; }
.save-btn { background: #007bff; color: white; }
.reset-btn { background: #6c757d; color: white; }
.generate-btn { background: #642a58; color: white; }

.panel-controls button:hover {
  opacity: 0.9;
}