/* Google Fonts moved to application.html.erb for performance */

/* Self-hosted SF Pro font faces */
@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 400;
  src:
    local("SF Pro Text Regular"),
    local("SFProText-Regular"),
    url("/assets/San-Francisco-Pro-Fonts/SF-Pro-Text-Regular-cb0cdca4.otf") format("opentype");
}

@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 500;
  src:
    local("SF Pro Text Medium"),
    local("SFProText-Medium"),
    url("/assets/San-Francisco-Pro-Fonts/SF-Pro-Text-Medium-82039b66.otf") format("opentype");
}

@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 600;
  src:
    local("SF Pro Text Semibold"),
    local("SFProText-Semibold"),
    url("/assets/San-Francisco-Pro-Fonts/SF-Pro-Text-Semibold-afaf8099.otf") format("opentype");
}

@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 700;
  src:
    local("SF Pro Text Bold"),
    local("SFProText-Bold"),
    url("/assets/San-Francisco-Pro-Fonts/SF-Pro-Text-Bold-d8129860.otf") format("opentype");
}

button:not(:disabled):not([aria-disabled="true"]),
input[type="submit"]:not(:disabled):not([aria-disabled="true"]),
input[type="reset"]:not(:disabled):not([aria-disabled="true"]),
input[type="button"]:not(:disabled):not([aria-disabled="true"]) {
  cursor: pointer;
}

html {
  scroll-behavior: smooth;
}

#faq,
#pricing {
  scroll-margin-top: 96px;
}

button:disabled,
button[disabled],
button[aria-disabled="true"] {
  cursor: not-allowed;
}



.disabled {
  opacity: 0.24;
  cursor: not-allowed;
}

.w-sm {
  width: 24rem;
}



/* Global disabled button styling - applies to all buttons */
button:disabled,
button[disabled],
a.cursor-not-allowed,
input[type="submit"]:disabled,
input[type="submit"][disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background-color: #e5e7eb !important;
  /* Tailwind gray-200 */
  color: #6b7280 !important;
  /* Tailwind gray-600 */
  border-color: #e5e7eb !important;
}

/* Video card consistency - ensure forms don't add extra spacing */
.group form,
.group/card form {
  margin: 0;
  display: inline-block;
}

/* Video Loading Animation */
.video-loader {
  --loader-size: 96px;
  --loader-ring-color: #ffffff;
  position: relative;
  width: var(--loader-size);
  height: var(--loader-size);
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.35));
}

.video-loader:before,
.video-loader:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  animation: pulsOut 1.8s ease-in-out infinite;
}

.video-loader:before {
  box-shadow: inset 0 0 0 1rem var(--loader-ring-color);
  animation-name: pulsIn;
}

.video-loader:after {
  inset: 1rem;
  box-shadow: 0 0 0 0 var(--loader-ring-color);
}

@keyframes pulsIn {
  0% {
    box-shadow: inset 0 0 0 1rem var(--loader-ring-color, #fff);
    opacity: 1;
  }

  50%,
  100% {
    box-shadow: inset 0 0 0 0 var(--loader-ring-color, #fff);
    opacity: 0;
  }
}

@keyframes pulsOut {

  0%,
  50% {
    box-shadow: 0 0 0 0 var(--loader-ring-color, #fff);
    opacity: 0;
  }

  100% {
    box-shadow: 0 0 0 1rem var(--loader-ring-color, #fff);
    opacity: 1;
  }
}

/* Black variant for light backgrounds */
.video-loader-black {
  --loader-ring-color: #000000;
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, 0.35));
}

/* Custom styles */

body {
  /* background-color: #F3F1EE; */
  background-color: #fdf8f3;

}

.big-shadow {
  box-shadow: 0px 4px 16px rgba(17, 17, 26, 0.1), 0px 8px 24px rgba(17, 17, 26, 0.1), 0px 16px 56px rgba(17, 17, 26, 0.1);
}

/* Modern Dashboard Styles */
.dashboard-card {
  @apply bg-white rounded-2xl shadow-sm hover:shadow-md transition-shadow duration-300;
}

.dashboard-card-hover {
  @apply hover:shadow-lg hover:-translate-y-0.5 transition-all duration-300;
}

.gradient-avatar {
  @apply bg-gradient-to-br from-blue-400 to-purple-500;
}

.gradient-button {
  @apply bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700;
}

.message-bubble {
  @apply bg-blue-50 rounded-xl p-4 hover:bg-blue-100 transition-colors duration-200;
}

.team-member-card {
  @apply p-3 hover:bg-gray-50 rounded-lg transition-colors duration-200 cursor-pointer;
}

.icon-button {
  @apply p-3 bg-gray-100 rounded-full hover:bg-gray-200 transition-all duration-200 hover:scale-110;
}

.sidebar-link {
  @apply flex items-center space-x-3 px-4 py-3 rounded-lg transition-all duration-200;
}

.sidebar-link-active {
  @apply bg-blue-50 text-blue-600 font-medium;
}

.sidebar-link-inactive {
  @apply text-gray-600 hover:bg-gray-50;
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 9999px;
  background-color: #3C99DC;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
  line-height: 1;
}

/* Custom brand color utilities layered for Tailwind v4 */
@layer utilities {

  /* New preferred name */
  .blue-bg {
    background-color: #3C99DC;
  }

  /* Backwards-compatible aliases (can be removed later) */
  .bg-blue {
    background-color: #3C99DC;
  }

  .border-blue {
    border-color: #3C99DC;
  }

  .text-blue {
    color: #3C99DC;
  }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Audio waveform animation */
@keyframes wave {

  0%,
  100% {
    height: 20px;
  }

  50% {
    height: 35px;
  }
}

.waveform-bar {
  animation: wave 1.2s ease-in-out infinite;
}

.waveform-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.waveform-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.waveform-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.waveform-bar:nth-child(5) {
  animation-delay: 0.4s;
}

/* Card entrance animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out;
}

/* Pulse animation for notification badge */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.notification-badge {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.aspect-9-16 {
  aspect-ratio: 9 / 16;
}

.playfair {
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
}

/* Footer gradient background */
.footer-gradient {
  background: linear-gradient(to bottom, #fdf8f3 0%, #ffffff 100%);
}

/* Hook option cards */
.hook-option-card {
  width: 100%;
  text-align: left;
  padding: 1.2rem;
  border-radius: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 100px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  position: relative;
  text-decoration: none;
  height: 100%;
  box-sizing: border-box;
}

.hook-option-card:hover {
  background-color: #E8F4FF;
  outline: none;
}

.hook-option-card:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(60, 153, 220, 0.45);
}

.hook-option-card--default {
  background-color: #F9FCFF;
}

.hook-option-card--selected {
  border: 2px solid #3C99DC;
  background-color: #D4EBFF;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.hook-option-card--inactive {
  border: 2px solid #E5E7EB;
  background-color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.hook-option-text {
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 600;
  color: #0F172A;
  padding-right: 2rem;
  margin: 0;
  white-space: pre-line;
}

@media (max-width: 640px) {
  .hook-option-text {
    padding-right: 1rem;
  }
}

/* Avatar Card Favorite Button Hover States */
.favorite-btn svg.text-orange-600:hover {
  fill: white !important;
  stroke: #ea580c !important;
  /* orange-600 */
  stroke-width: 2 !important;
}

.favorite-btn svg.text-white:hover {
  color: #ea580c;
  /* orange-600 */
}

/* Touch device visibility utility */
@media (hover: none) {
  .touch-visible {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

/* Hook text size slider styling */
.hook-text-size-slider {
  --range-progress: 0%;
  accent-color: #3C99DC;
  appearance: none;
  height: 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(to right, #3C99DC var(--range-progress), #E5E7EB var(--range-progress));
}

.hook-text-size-slider:focus {
  outline: none;
}

.hook-text-size-slider::-webkit-slider-runnable-track {
  height: 0.5rem;
  background: transparent;
  border-radius: 9999px;
}

.hook-text-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #3C99DC;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  margin-top: -6px;
  border: none;
}

.hook-text-size-slider::-moz-range-track {
  height: 0.5rem;
  background: #E5E7EB;
  border-radius: 9999px;
}

.hook-text-size-slider::-moz-range-progress {
  height: 0.5rem;
  background: #3C99DC;
  border-radius: 9999px;
}

.hook-text-size-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #3C99DC;
  border: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

/* Video Player Subtitles (Cues) - Global Override */
video::cue,
::cue {
  font-size: 1.125rem !important;
  /* Matches Tailwind text-lg (18px) */
  line-height: 1.4 !important;
  font-family: "SF Pro", system-ui, sans-serif !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

/* Webkit specific (Safari/Chrome) for better targeting if standard fails */
video::-webkit-media-text-track-display {
  font-size: 1.125rem !important;
}

video::-webkit-media-text-track-container {
  transform: translateY(-10%) !important;
  /* Adjust vertical position slightly if needed */
}

/* Inward facing triangles for WaveSurfer Region Handles */
/* Left/Start Handle -> Arrow pointing Right (top aligned) */
[data-region-handle="start"]::after,
[data-region-handle="left"]::after,
.wavesurfer-region-handle-start::after,
[data-resize="start"]::after,
[data-resize="left"]::after,
[part~="region-handle-left"]::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #fff;
  pointer-events: none;
}

/* Right/End Handle -> Arrow pointing Left (top aligned) */
[data-region-handle="end"]::after,
[data-region-handle="right"]::after,
.wavesurfer-region-handle-end::after,
[data-resize="end"]::after,
[data-resize="right"]::after,
[part~="region-handle-right"]::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 6px solid #fff;
  pointer-events: none;
}

/* Region Handle Base Styles (Broad selectors for compatibility) */
[data-region-handle],
[data-resize],
.wavesurfer-region-handle,
[part~="region-handle"] {
  background-color: #3C99DC !important;
  /* Brand Blue */
  width: 10px !important;
  opacity: 1 !important;
  border-radius: 0;
  z-index: 3 !important;
}

/* Specific styling if needed for left/right uniqueness, but likely shared */
[data-region-handle="left"],
[data-region-handle="start"],
[part~="region-handle-left"] {
  border-radius: 4px 0 0 4px !important;
  border-left: none !important;
}

[data-region-handle="right"],
[data-region-handle="end"],
[part~="region-handle-right"] {
  border-radius: 0 4px 4px 0 !important;
  border-right: none !important;
}