/*
 * 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.
 */

/* Hide file attachment button in Trix editor for section text */
.trix-content-wrapper trix-toolbar .trix-button-group--file-tools {
  display: none !important;
}

/* Trix editor styling */
.trix-content-wrapper trix-editor {
  min-height: 120px;
  padding: 0.75rem;
  background: white;
}

.trix-content-wrapper trix-toolbar {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem;
}

.trix-content-wrapper trix-toolbar .trix-button {
  border-radius: 0.375rem;
}

.trix-content-wrapper trix-toolbar .trix-button:hover {
  background: #e5e7eb;
}

.trix-content-wrapper trix-toolbar .trix-button.trix-active {
  background: #d1fae5;
}

/* Link styling in Trix editor */
.trix-content-wrapper trix-editor a {
  color: #2563eb;
  text-decoration: underline;
}

.trix-content-wrapper trix-editor a:hover {
  color: #1d4ed8;
}

/* Link styling in Introduction page */
.prose a {
  color: #2563eb !important;
  text-decoration: underline !important;
}

.prose a:hover {
  color: #1d4ed8 !important;
}

/* Trix editor content styling - blockquote */
.trix-content-wrapper trix-editor blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: #6b7280;
  font-style: italic;
}

/* Trix editor content styling - ordered list */
.trix-content-wrapper trix-editor ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

/* Trix editor content styling - unordered list */
.trix-content-wrapper trix-editor ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.trix-content-wrapper trix-editor li {
  margin: 0.25rem 0;
}

/* Prose (Introduction page) - blockquote */
.prose blockquote {
  border-left: 4px solid #d1d5db !important;
  padding-left: 1rem !important;
  margin: 1rem 0 !important;
  color: #6b7280 !important;
  font-style: italic !important;
}

/* Prose (Introduction page) - ordered list */
.prose ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin: 1rem 0 !important;
}

/* Prose (Introduction page) - unordered list */
.prose ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin: 1rem 0 !important;
}

.prose li {
  margin: 0.25rem 0 !important;
}

/* Tom Select Custom Styling for Country Selector */
.ts-wrapper.country-select-wrapper {
  width: 100% !important;
}

.ts-wrapper.country-select-wrapper .ts-control {
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem 1rem !important;
  background: white !important;
  min-height: 42px !important;
  max-height: 42px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

.ts-wrapper.country-select-wrapper .ts-control:hover {
  border-color: #10b981 !important;
}

.ts-wrapper.country-select-wrapper.focus .ts-control {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  outline: none !important;
}

.ts-wrapper.country-select-wrapper .ts-control input {
  font-size: 0.875rem !important;
  color: #374151 !important;
  flex: 1 !important;
  min-width: 0 !important;
}

/* Hide input when item is selected (but not when focused for searching) */
.ts-wrapper.country-select-wrapper.has-items:not(.focus) .ts-control input {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
}

/* When focused with items, allow input to show for searching */
.ts-wrapper.country-select-wrapper.has-items.focus .ts-control input {
  width: auto !important;
  flex: 1 !important;
  opacity: 1 !important;
  position: relative !important;
}

.ts-wrapper.country-select-wrapper .ts-control input::placeholder {
  color: #9ca3af !important;
}

.ts-wrapper.country-select-wrapper .ts-control > .item {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #374151 !important;
  font-size: 0.875rem !important;
  display: flex !important;
  align-items: center !important;
  line-height: 1.5 !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown {
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  margin-top: 4px !important;
  padding: 0.25rem !important;
  background: white !important;
  max-height: 300px !important;
  overflow-y: auto !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown .ts-dropdown-content {
  max-height: none !important;
  padding: 0 !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown .option {
  padding: 0.625rem 0.75rem !important;
  border-radius: 0.375rem !important;
  margin: 2px 0 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown .option:hover,
.ts-wrapper.country-select-wrapper .ts-dropdown .option.active {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown .option.selected {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown .option .flag-emoji {
  font-size: 1.25rem !important;
  margin-right: 0.75rem !important;
}

.ts-wrapper.country-select-wrapper .ts-dropdown .option .country-name {
  color: #374151 !important;
  font-size: 0.875rem !important;
}

/* Hide the caret/arrow */
.ts-wrapper.country-select-wrapper .ts-control::after {
  display: none !important;
}

/* Custom dropdown arrow */
.ts-wrapper.country-select-wrapper .ts-control {
  padding-right: 2.5rem !important;
  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") !important;
  background-position: right 0.75rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.25rem !important;
}

/* Tooltip styles are handled by tooltip_controller.js */
