/* ra-public.css */
/*
.ra-waveform {
  width: auto;
  height: 128px;
  min-height: 128px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
}

.ra-waveform ::part(region) {
  opacity: 0.5;
}

.ra-waveform ::part(region-handle) {
  width: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: ew-resize;
}

.ra-waveform ::part(region-handle):hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.ra-status {
  margin: 10px 0;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
}

.ra-status--error {
  background-color: #ffebee;
  color: #c62828;
}

.ra-status--info {
  background-color: #e3f2fd;
  color: #1565c0;
}

.ra-recorder-wrapper {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 20px;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.ra-audio-recorder {
  background: rgba(50, 50, 50, 0.1);
  border-radius: 8px;
  padding: 20px;
  max-width: 100%;
  margin: 20px 0;
}
*/
.ra-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.ra-controls--disabled {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.ra-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0.25rem;
  text-align: center;
}

.ra-button {
  display: flex;
  flex: auto;
  align-items: center;
  gap: 1em;
  padding: 1.5em;
  border: none;
  border-radius: .4em;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ra-button:hover:not(:disabled) {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.ra-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Optional hover effect for disabled buttons */
.ra-button:disabled:hover {
  background-color: inherit;
  color: inherit;
}

.ra-button.record {
  background: #ff4444;
  color: white;
}

.ra-button.record:hover:not(:disabled) {
  background: #ff2222;
}

.ra-button.stop {
  background: #444;
  color: white;
}

.ra-button.play {
  background: #4caf50;
  color: white;
}

.ra-button.play:hover:not(:disabled) {
  background: #30a03a;
}

.ra-button.upload {
  background: #2196f3;
  color: white;
}

.ra-button.upload:hover:not(:disabled) {
  background: #e0e0e0;
}

.ra-button.trim {
  background: #9c27b0;
  color: white;
}

.ra-button.trim:hover:not(:disabled) {
  background: #7b2fa2;
}

.ra-icon {
  font-size: 16px;
  line-height: 1;
}

.ra-waveform {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  min-height: 10rem;
}

.ra-status {
  margin: 1em 0 0 0;
  padding: 1em;
  border-radius: 0.5em;
  background: rgb(217 243 245 / 80%);
  font-size: 1.5em;
  color: #000;
}

/* Collapsible components */
.ra-collapsible {
  border-collapse: collapse;
  border: 1px solid rgba(200, 200, 200, 0.2);
}
.ra-collapsible-title {
  font-size: 1.5em;
  padding: 1em;
  background-color: rgba(200, 200, 200, 0.1);
  margin: 0;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ra-collapsible-title:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.ra-collapsible-icon {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.ra-collapsible-title--active .ra-collapsible-icon {
  transform: rotate(180deg);
  background-color: rgba(0, 0, 0, 0.03);
}

.ra-collapsible-content {
  font-size: 1.3em;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 1em;
  border-top: none;
  /* Faster closing animation */
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ra-collapsible-content--active {
  max-height: 100vh;
  opacity: 1;
  padding: 1em;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tune down bg for message */
.ra-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  opacity: 1;
  transition: opacity 1s;
}

.ra-message {
  background: rgba(1, 141, 170, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 2rem 3rem;
  border-radius: 0.5rem;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  align-items: center;
  text-align: center;
  transition: opacity 1s;
  gap: 1rem;
  opacity: 1;
}

.ra-message--success {
  background-color: #4caf50;
}
.ra-message--error {
  background-color: #f44336;
}
.ra-message--warning {
  background-color: #ff9800;
}
.ra-message--info {
  background-color: #2196f3;
}

.ra-message::before {
  content: "✓";
  color: white;
  font-size: 1.5em;
  padding: 0 1rem 0 0;
}

.ra-questions {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 8px;
}

.ra-question-item {
  margin-bottom: 1.5rem;
}

.ra-question-item label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.ra-answer-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.submit-answers {
  background: #4caf50 !important;
  color: white !important;
}

.ra-input-group {
  margin: 2em 0;
  font-size: large;
}

.ra-input-group label {
  padding: 1em;
}

.ra-input-group .ra-user-grade-input {
  padding: 1em;
  border: 1px solid #007cba;
  border-radius: 4px;
  margin: 2em 0;
  font-size: large;
}

/* In public/css/ra-public.css */
.ra-pdf-links-section {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #eee;
}

.dashicons.dashicons-external {
  font-size: 0.9em;
  text-decoration: none;
  margin-left: 0.2em;
}