/* Circular Std Font Faces */
@font-face {
  font-family: 'Circular Std';
  src: local('Circular Std Book'),
       url('/public/fonts/circular-std/CircularStd-Book.woff2') format('woff2'),
       url('/public/fonts/circular-std/CircularStd-Book.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: local('Circular Std Book'),
       url('/public/fonts/circular-std/CircularStd-Book.woff2') format('woff2'),
       url('/public/fonts/circular-std/CircularStd-Book.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: local('Circular Std Medium'),
       url('/public/fonts/circular-std/CircularStd-Medium.woff2') format('woff2'),
       url('/public/fonts/circular-std/CircularStd-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: local('Circular Std Medium'),
       url('/public/fonts/circular-std/CircularStd-Medium.woff2') format('woff2'),
       url('/public/fonts/circular-std/CircularStd-Medium.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: local('Circular Std Bold'),
       url('/public/fonts/circular-std/CircularStd-Bold.woff2') format('woff2'),
       url('/public/fonts/circular-std/CircularStd-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: local('Circular Std Black'),
       url('/public/fonts/circular-std/CircularStd-Black.woff2') format('woff2'),
       url('/public/fonts/circular-std/CircularStd-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: "Circular Std", "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #0f172a;
  background-color: #f8fafc;
}

/* Noise texture */
.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.card-hover {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0px rgba(15, 23, 42, 0.1); /* Hard shadow */
}

/* Custom scrollbar for inner containers */
.hide-scroll::-webkit-scrollbar {
  display: none;
}

.gradient-text {
  background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pattern {
  background-color: #ffffff;
  background-image: radial-gradient(#14b8a6 0.5px, #ffffff 0.5px);
  background-size: 20px 20px;
}

.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-blob {
  animation: blob 8s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes blob {
  0%,
  100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* Select input styling to match text inputs */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
  cursor: pointer;
}

select::-ms-expand {
  display: none;
}

select:focus {
  outline: none;
}

/* HTMX Indicator Styles */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Hide icon when spinner is active */
.htmx-request [data-ajax-icon] {
  opacity: 0;
  pointer-events: none;
}

/* Hide chevron icon when request is active */
.htmx-request [data-chevron-icon] {
  opacity: 0;
  pointer-events: none;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-sm {
  padding: 0.125rem 0.625rem;
}

.badge-md {
  padding: 0.25rem 0.75rem;
}

.badge-draft {
  background-color: #f1f5f9;
  color: #1e293b;
}

.badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-archived {
  background-color: #f3f4f6;
  color: #1f2937;
}

i {
  font-size: 1.25rem;
}

/* Icon Button Styles */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #475569;
  background-color: transparent;
  border: none;
  border-radius: 0.5rem;
  transition: all 200ms ease;
  cursor: pointer;
}

.icon-button:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.icon-button:focus {
  outline: none;
  ring: 2px;
  ring-color: #0d9488;
  ring-offset: 2px;
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.submit-button {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #0d9488;
  border-radius: 0.75rem;
  transition-property: background-color, color;
  transition-duration: 200ms;
  transition-timing-function: ease;
  outline: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.submit-button:hover {
  background-color: #14b8a6;
}

.submit-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px #0d9488;
}

.submit-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #0d9488, 0 0 0 4px #fff;
}

@keyframes grow {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}