/* ========== Prayer Submit Page ========== */

.prayer-submit-container {
  max-width: 1080px;
  margin: 2.75rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  gap: 2.75rem;
  min-width: 0;
}

/* Scripture Section */
.scripture-section {
  position: relative;
  background: linear-gradient(135deg, rgba(125, 182, 216, 0.22), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(125, 182, 216, 0.3);
  box-shadow: 0 26px 60px rgba(12, 35, 56, 0.12);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
}

.scripture-section::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--color-accent-strong), rgba(125, 182, 216, 0.2));
}

.scripture-content {
  max-width: 800px;
  margin: 0 auto;
}

.scripture-text {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--color-ink);
  margin-bottom: 1rem;
  line-height: 1.8;
  font-family: var(--font-display);
}

.scripture-reference {
  font-size: 1rem;
  color: var(--color-muted);
  font-weight: 600;
}

/* Form Section */
.prayer-form-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f4f8fb 100%);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px rgba(12, 35, 56, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.28);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.prayer-form-section::before {
  content: '';
  position: absolute;
  inset: -120px -60px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(125, 182, 216, 0.26), transparent 70%);
}

.form-container {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.form-title {
  font-size: clamp(1.9rem, 4.4vw, 2.4rem);
  color: var(--color-ink);
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
}

.form-title::after {
  content: '';
  display: block;
  width: 140px;
  height: 4px;
  margin: 0.9rem auto 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent-strong), #79b8dd);
  opacity: 0.75;
}

.prayer-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

fieldset.form-group {
  border: 1px solid rgba(125, 182, 216, 0.22);
  padding: 1.4rem;
  margin: 0;
  border-radius: 20px;
  background: rgba(125, 182, 216, 0.08);
  min-inline-size: 0;
}

fieldset.form-group > .form-label {
  margin-bottom: 0.75rem;
}

.form-label {
  font-weight: 600;
  color: var(--color-ink);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
}

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-accent-strong);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: help;
  font-weight: 700;
}

/* Form Controls */
.form-control,
.prayer-textarea {
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 20px rgba(12, 35, 56, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.form-control:focus,
.prayer-textarea:focus {
  outline: none;
  border-color: var(--color-accent-strong);
  box-shadow: 0 0 0 3px rgba(125, 182, 216, 0.25);
  transform: translateY(-1px);
}

.prayer-textarea {
  resize: vertical;
  min-height: 220px;
  line-height: 1.6;
}

.form-help {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
}

.form-error {
  color: #b91c1c;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 10px;
}

.form-error-box {
  background: rgba(239, 68, 68, 0.12);
  border-left: 4px solid #ef4444;
  padding: 1rem;
  border-radius: 10px;
  color: #b91c1c;
}

/* Category Select */
.category-select {
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background-color: #fff;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
}

.category-select:focus {
  outline: none;
  border-color: var(--color-accent-strong);
  box-shadow: 0 0 0 3px rgba(125, 182, 216, 0.25);
}

/* Format Options */
.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(15, 42, 63, 0.08);
}

.format-option:hover {
  border-color: rgba(63, 132, 184, 0.45);
  box-shadow: 0 16px 28px rgba(15, 42, 63, 0.12);
  transform: translateY(-2px);
}

.format-option input[type='radio'] {
  cursor: pointer;
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent-strong);
}

.format-option input[type='radio']:checked + .format-label {
  color: var(--color-accent-strong);
  font-weight: 700;
}

.format-option:has(input[type='radio']:checked) {
  border-color: var(--color-accent-strong);
  background: rgba(125, 182, 216, 0.15);
  box-shadow: 0 16px 30px rgba(15, 42, 63, 0.14);
}

.format-option:focus-within {
  border-color: var(--color-accent-strong);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.format-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.format-icon {
  font-size: 1.35rem;
}

/* Format Sections */
.format-section + .format-section {
  margin-top: 0;
}

#format-content {
  display: grid;
  gap: 1.5rem;
}

.format-section {
  animation: fadeIn 0.3s ease;
  background: rgba(125, 182, 216, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(125, 182, 216, 0.2);
  padding: 1.5rem;
}

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

/* Recording Container */
.recording-container {
  background: transparent;
  padding: 0;
  border-radius: 16px;
  border: none;
  display: grid;
  gap: 1.2rem;
}

.recording-fallback-group {
  margin-top: 0.25rem;
}

.recording-fallback-input {
  width: 100%;
}

.recording-fallback-help {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.recording-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.audio-meter {
  display: none;
  gap: 6px;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(125, 182, 216, 0.12);
  border: 1px solid rgba(125, 182, 216, 0.25);
}

.audio-meter.is-active {
  display: flex;
}

.audio-meter__bar {
  width: 6px;
  height: 32px;
  background: linear-gradient(180deg, var(--color-accent-strong), #79b8dd);
  border-radius: 999px;
  transform-origin: bottom;
  transform: scaleY(0.2);
  transition: transform 0.08s ease;
}

.recording-btn {
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, var(--color-accent-strong), #79b8dd);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 12px 26px rgba(12, 35, 56, 0.2);
}

.recording-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(12, 35, 56, 0.2);
}

.recording-btn.stop {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.recording-btn.stop:hover {
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.recording-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Video Camera */
#video-camera {
  background: #000;
  margin-bottom: 1rem;
  border-radius: 12px;
}

/* Playback Section */
.playback-section {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.playback-section h4 {
  margin-top: 0;
  color: var(--color-ink);
}

.recording-preview-note {
  margin: 0.3rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(63, 132, 184, 0.25);
  background: rgba(125, 182, 216, 0.12);
  color: var(--color-ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

audio,
video {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.btn-delete {
  padding: 0.75rem 1.5rem;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  margin-top: 1rem;
}

.btn-delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.btn-delete:active {
  transform: translateY(0);
}

/* Submit Button Group */
.submit-group {
  margin-top: 2.2rem;
}

.btn-submit {
  width: 100%;
  padding: 1.1rem 2rem;
  background: linear-gradient(135deg, var(--color-accent-strong), #79b8dd);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  letter-spacing: 0.04em;
  box-shadow: 0 18px 32px rgba(12, 35, 56, 0.24);
  max-width: 520px;
  margin: 0 auto;
  display: block;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(12, 35, 56, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 25, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius-md);
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 40px rgba(12, 35, 56, 0.2);
  animation: slideIn 0.3s ease;
}

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

.modal-content h2 {
  color: var(--color-ink);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.modal-content p {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-yes,
.btn-no {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-yes {
  background: linear-gradient(135deg, var(--color-accent-strong), #79b8dd);
  color: #fff;
  box-shadow: 0 12px 24px rgba(12, 35, 56, 0.2);
}

.btn-yes:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(12, 35, 56, 0.2);
}

.btn-no {
  background: rgba(148, 163, 184, 0.2);
  color: var(--color-ink);
}

.btn-no:hover {
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .prayer-submit-container {
    margin: 1.25rem auto 2.8rem;
    padding: 0 0.9rem;
    gap: 1.4rem;
  }

  .scripture-section {
    padding: 2rem;
  }

  .prayer-form-section {
    padding: 1.9rem;
  }

  .form-title {
    font-size: clamp(1.7rem, 5.5vw, 2rem);
  }

  .scripture-text {
    font-size: 1.15rem;
  }

  fieldset.form-group {
    padding: 1.1rem;
  }

  .recording-controls {
    flex-direction: column;
  }

  .recording-btn {
    width: 100%;
  }

  .modal-buttons {
    flex-direction: column-reverse;
  }

  .btn-yes,
  .btn-no {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .prayer-submit-container {
    margin: 1rem auto 2.2rem;
    padding: 0 0.75rem;
    gap: 1.15rem;
  }

  .scripture-section {
    padding: 1.45rem;
  }

  .scripture-text {
    font-size: 1rem;
    line-height: 1.65;
  }

  .prayer-form-section {
    padding: 1.25rem;
  }

  .form-title {
    font-size: clamp(1.45rem, 7vw, 1.8rem);
  }

  .form-title::after {
    width: 104px;
    margin-top: 0.65rem;
  }

  .prayer-form {
    gap: 1.2rem;
  }

  fieldset.form-group {
    padding: 0.9rem;
    border-radius: 16px;
  }

  .format-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .format-option {
    padding: 0.8rem 0.95rem;
  }

  .prayer-textarea {
    min-height: 170px;
  }

  .recording-fallback-input {
    font-size: 0.95rem;
    padding: 0.7rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .prayer-submit-container {
    padding: 0 0.6rem;
  }

  .scripture-section {
    padding: 1.15rem;
  }

  .prayer-form-section {
    padding: 1rem;
    border-radius: 18px;
  }

  .form-title {
    font-size: clamp(1.3rem, 8vw, 1.65rem);
  }

  .form-control,
  .prayer-textarea,
  .category-select {
    padding: 0.85rem 0.9rem;
  }

  .btn-submit {
    width: 100%;
  }
}
