/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom Font: HeadingNow */
@font-face {
  font-family: 'HeadingNow';
  src: url("/fonts/HeadingNow-57-ExtraBold.ttf") format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Set Inter as default font for the entire app */
html, body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Utility class for Montserrat font */
.font-display {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Utility class for HeadingNow font */
.font-heading {
  font-family: 'HeadingNow', 'Montserrat', system-ui, sans-serif;
  font-weight: 800;
}

/* ChirpInput Styles - Matching the Vue component exactly */

.chirp-input-wrapper {
  display: block;
  position: relative;
  margin-bottom: 20px;
}

.chirp-input-wrapper[data-has-error="true"] {
  margin-bottom: 40px;
}

.chirp-input-container {
  position: relative;
  background-color: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: text;
}

.chirp-input-container:hover:not(.disabled):not(.focused) {
  border-color: rgba(255, 255, 255, 0.2);
}

.chirp-input-container:focus-within {
  border-color: #60A5FA;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.chirp-input-container.error {
  border-color: #EF4444;
}

.chirp-input-container.error:focus-within {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.chirp-input-container.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Label row inside container */
.chirp-input-container .label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 2px 12px;
}

.chirp-input-container .label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.chirp-input-container.has-value .label {
  color: rgba(255, 255, 255, 0.6);
}

.chirp-input-container.error .label {
  color: #EF4444;
}

.chirp-input-container:focus-within .label {
  color: #60A5FA;
}

/* Required indicator */
.required-indicator {
  color: #FFFFFF;
  margin-left: 2px;
}

/* Info icon and tooltip */
.info-wrapper {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.info-icon {
  width: 14px;
  height: 14px;
  cursor: help;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: rgba(255, 255, 255, 0.4);
}

.info-wrapper:hover .info-icon {
  opacity: 1;
  color: rgba(255, 255, 255, 0.6);
}

.tooltip {
  position: absolute;
  background-color: #1F2937;
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  word-wrap: break-word;
  max-width: 250px;
  width: max-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  visibility: hidden;
}

.tooltip.top {
  bottom: calc(100% + 8px);
  right: -4px;
  transform: translateY(4px);
}

.tooltip.top::after {
  content: '';
  position: absolute;
  top: calc(100% - 5px);
  right: 8px;
  width: 10px;
  height: 10px;
  background-color: #1F2937;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

/* Markdown content in tooltips */
.tooltip.markdown-content {
  line-height: 1.5;
}

.tooltip.markdown-content p {
  margin: 0 0 8px 0;
}

.tooltip.markdown-content p:last-child {
  margin-bottom: 0;
}

.tooltip.markdown-content strong {
  font-weight: 600;
  color: #FFFFFF;
}

.tooltip.markdown-content em {
  font-style: italic;
}

.tooltip.markdown-content a {
  color: #60A5FA;
  text-decoration: underline;
}

.tooltip.markdown-content a:hover {
  color: #93BBFC;
}

.tooltip.markdown-content code {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
}

.tooltip.markdown-content s,
.tooltip.markdown-content del {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Input wrapper */
.input-wrapper-inner {
  position: relative;
  display: flex;
  align-items: center;
}

/* Input styles */
.chirp-text-input,
.chirp-select-input {
  width: 100%;
  padding: 8px 12px 12px 12px;
  font-size: 16px;
  color: #FFFFFF;
  background-color: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chirp-text-input::placeholder,
.chirp-select-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chirp-text-input:disabled,
.chirp-select-input:disabled {
  cursor: not-allowed;
}

/* Remove number input spinners */
input[type="number"].chirp-text-input::-webkit-inner-spin-button,
input[type="number"].chirp-text-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"].chirp-text-input {
  -moz-appearance: textfield;
}

/* Character counter */
.char-counter {
  position: absolute;
  bottom: -21px;
  right: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

.char-counter.warning {
  color: rgba(255, 255, 255, 0.6);
}

.char-counter.error {
  color: rgba(255, 255, 255, 1);
}

/* Adjust counter position when error is present */
.chirp-input-wrapper[data-has-error="true"] .char-counter {
  bottom: -40px;
}

/* Error message */
.error-message {
  position: absolute;
  bottom: -21px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #EF4444;
  margin-top: 4px;
}

.error-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Select dropdown specific styles */
.chirp-select-input {
  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 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 40px;
}

/* Select dropdown using chirp-text-input class */
select.chirp-text-input {
  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 14px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 42px;
}

/* Size variations */
.chirp-input-container.size-small .chirp-text-input,
.chirp-input-container.size-small .chirp-select-input {
  padding: 6px 10px 10px 10px;
  font-size: 14px;
}

.chirp-input-container.size-large .chirp-text-input,
.chirp-input-container.size-large .chirp-select-input {
  padding: 10px 14px 14px 14px;
  font-size: 18px;
}

/* Dynamic character counter update */
.chirp-text-input[data-length] ~ .char-counter::before {
  content: attr(data-current) "/" attr(data-max);
}

/* Phone number formatting animations */
.chirp-text-input[type="tel"] {
  font-variant-numeric: tabular-nums;
}

/* ChirpButton Styles */
.chirp-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 150ms ease-in-out;
  cursor: pointer;
}

.chirp-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.chirp-button:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.chirp-button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Extra small button styles */
.chirp-button-xs {
  font-size: 12px;
  line-height: 12px;
  min-height: 24px;
  padding: 8px 24px;
}

/* Adjust icon size for xs buttons */
.chirp-button-xs .chirp-button-icon-left svg,
.chirp-button-xs .chirp-button-icon-right svg {
  width: 12px;
  height: 12px;
}

/* Adjust gap and content alignment for xs buttons */
.chirp-button-xs .chirp-button-content {
  gap: 0.25rem;
  height: 12px;
  line-height: 12px;
}

.chirp-button-spinner {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ChirpCard Styles */
.chirp-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

.chirp-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Autocomplete Dropdown Styles */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.autocomplete-results {
  padding: 4px 0;
}

.autocomplete-item {
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Clear button for autocomplete */
.clear-button {
  position: absolute;
  right: 10px;
  top: 45%;
  transform: translateY(-50%);
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.clear-button:hover {
  color: rgba(255, 255, 255, 0.8);
}

.clear-button.hidden {
  display: none;
}

/* Adjust input padding when clear button is present */
.input-wrapper-inner:has(.clear-button:not(.hidden)) .chirp-text-input {
  padding-right: 36px;
}

/* Custom long dashed border */
.long-dashed-border {
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 8px,
    transparent 8px,
    transparent 16px
  ),
  repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 8px,
    transparent 8px,
    transparent 16px
  ),
  repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 8px,
    transparent 8px,
    transparent 16px
  ),
  repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 8px,
    transparent 8px,
    transparent 16px
  );
  background-size: 100% 1px, 1px 100%, 100% 1px, 1px 100%;
  background-position: 0 0, 100% 0, 0 100%, 0 0;
  background-repeat: repeat-x, repeat-y, repeat-x, repeat-y;
  border: none !important;
}

.chirp-input-wrapper {
  position: relative;
}

/* Color Picker Styles */
.color-picker-container {
  position: absolute;
  z-index: 1000;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0;
  width: 220px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.color-picker-container.hidden {
  display: none;
}

.color-picker-panel {
  width: 100%;
}

/* Gradient area for saturation/brightness */
.color-gradient-area {
  position: relative;
  width: 100%;
  height: 120px;
  border: none;
  border-radius: 8px 8px 0 0; /* Only round top corners, match container */
  background-color: hsl(0, 100%, 50%); /* Will be updated by JS based on hue */
  cursor: crosshair;
  margin: 0;
  overflow: hidden; /* Ensure child elements don't overflow rounded corners */
}

.color-gradient-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, #ffffff, transparent);
  border-radius: 8px 8px 0 0; /* Match parent border radius */
  pointer-events: none;
}

.color-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, #000000);
  border-radius: 8px 8px 0 0; /* Match parent border radius */
  pointer-events: none;
}

/* Circular selector */
.color-selector {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  top: 10%;
  left: 90%;
}

/* Bottom controls */
.color-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

/* Eyedropper button */
.eyedropper-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.eyedropper-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.eyedropper-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
}

/* Color preview */
.color-preview-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: #3b82f6;
  flex-shrink: 0;
}

/* Hue slider */
.hue-slider-container {
  position: relative;
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
}

.hue-slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 12px;
  transform: translateY(-50%);
  background: linear-gradient(to right,
    #ff0000 0%,
    #ffff00 17%,
    #00ff00 33%,
    #00ffff 50%,
    #0000ff 67%,
    #ff00ff 83%,
    #ff0000 100%);
  border-radius: 6px;
  pointer-events: none;
}

.hue-slider {
  position: relative;
  width: 100%;
  height: 32px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}

.hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hue-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}@import "thoughts/thoughts.css";
