@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

.pagy {
  @apply flex space-x-1 font-semibold text-sm text-gray-500;
}

.pagy a {
  @apply flex items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white;
}

.pagy a:hover {
  @apply bg-gray-300;
}

.pagy a:not([href]) {
  /* disabled links */
  @apply text-gray-300 bg-gray-100 cursor-default dark:text-gray-600 dark:bg-gray-700;
}

.pagy a.current {
  @apply text-white bg-gray-400 dark:bg-gray-600;
}

.pagy label {
  @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5 dark:bg-gray-700;
}

.pagy label input {
  @apply bg-gray-100 border-none rounded-md dark:bg-gray-600 dark:border-gray-500;
}

/* Add this to your CSS file or to app/assets/stylesheets/application.tailwind.css */

.masjid-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #10b981; /* Emerald green */
  color: white;
  font-weight: bold;
  border-radius: 100%;
  width: 100px;
  height: 100px;
}

.masjid-logo-placeholder span {
  font-size: 2.5rem;
}

/* Size variants */
.masjid-logo-placeholder.small {
  width: 50px;
  height: 50px;
}

.masjid-logo-placeholder.small span {
  font-size: 1.5rem;
}

.masjid-logo-placeholder.large {
  width: 200px;
  height: 200px;
}

.masjid-logo-placeholder.large span {
  font-size: 4rem;
}

/* Aspect Ratio utilities */
.aspect-w-16 {
  position: relative;
  padding-bottom: calc(9 / 16 * 100%);
}

.aspect-h-9 {
  position: relative;
}

.aspect-w-16.aspect-h-9 > * {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* For browsers that support aspect-ratio */
@supports (aspect-ratio: 16/9) {
  .aspect-w-16.aspect-h-9 {
    aspect-ratio: 16/9;
    padding-bottom: 0;
  }
  
  .aspect-w-16.aspect-h-9 > * {
    position: static;
  }
}

/* Cropper.js styles */
.cropper-container {
  direction: ltr;
  font-size: 0;
  line-height: 0;
  position: relative;
  touch-action: none;
  user-select: none;
}

.cropper-container img {
  display: block;
  height: auto;
  image-orientation: 0deg;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100%;
}

.cropper-wrap-box,
.cropper-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-modal {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.cropper-wrap-box,
.cropper-canvas {
  overflow: hidden;
}

.cropper-drag-box {
  background-color: #fff;
  opacity: 0;
}

.cropper-modal {
  background-color: #000;
  opacity: 0.5;
}

.cropper-view-box {
  display: block;
  height: 100%;
  outline: 1px solid #39f;
  outline-color: rgba(51, 153, 255, 0.75);
  overflow: hidden;
  width: 100%;
}

.cropper-dashed {
  border: 0 dashed #eee;
  display: block;
  opacity: 0.5;
  position: absolute;
}

.cropper-dashed.dashed-h {
  border-bottom-width: 1px;
  border-top-width: 1px;
  height: calc(100% / 3);
  left: 0;
  top: calc(100% / 3);
  width: 100%;
}

.cropper-dashed.dashed-v {
  border-left-width: 1px;
  border-right-width: 1px;
  height: 100%;
  left: calc(100% / 3);
  top: 0;
  width: calc(100% / 3);
}

.cropper-center {
  display: block;
  height: 0;
  left: 50%;
  opacity: 0.75;
  position: absolute;
  top: 50%;
  width: 0;
}

.cropper-center::before,
.cropper-center::after {
  background-color: #eee;
  content: ' ';
  display: block;
  position: absolute;
}

.cropper-center::before {
  height: 1px;
  left: -3px;
  top: 0;
  width: 7px;
}

.cropper-center::after {
  height: 7px;
  left: 0;
  top: -3px;
  width: 1px;
}

.cropper-face,
.cropper-line,
.cropper-point {
  display: block;
  height: 100%;
  opacity: 0.1;
  position: absolute;
  width: 100%;
}

.cropper-face {
  background-color: #fff;
  left: 0;
  top: 0;
}

.cropper-line {
  background-color: #39f;
}

.cropper-line.line-e {
  cursor: ew-resize;
  right: -3px;
  top: 0;
  width: 5px;
}

.cropper-line.line-n {
  cursor: ns-resize;
  height: 5px;
  left: 0;
  top: -3px;
}

.cropper-line.line-w {
  cursor: ew-resize;
  left: -3px;
  top: 0;
  width: 5px;
}

.cropper-line.line-s {
  bottom: -3px;
  cursor: ns-resize;
  height: 5px;
  left: 0;
}

.cropper-point {
  background-color: #39f;
  height: 5px;
  opacity: 0.75;
  width: 5px;
}

.cropper-point.point-e {
  cursor: ew-resize;
  margin-top: -3px;
  right: -3px;
  top: 50%;
}

.cropper-point.point-n {
  cursor: ns-resize;
  left: 50%;
  margin-left: -3px;
  top: -3px;
}

.cropper-point.point-w {
  cursor: ew-resize;
  left: -3px;
  margin-top: -3px;
  top: 50%;
}

.cropper-point.point-s {
  bottom: -3px;
  cursor: s-resize;
  left: 50%;
  margin-left: -3px;
}

.cropper-point.point-ne {
  cursor: nesw-resize;
  right: -3px;
  top: -3px;
}

.cropper-point.point-nw {
  cursor: nwse-resize;
  left: -3px;
  top: -3px;
}

.cropper-point.point-sw {
  bottom: -3px;
  cursor: nesw-resize;
  left: -3px;
}

.cropper-point.point-se {
  bottom: -3px;
  cursor: nwse-resize;
  height: 20px;
  opacity: 1;
  right: -3px;
  width: 20px;
}

@media (min-width: 768px) {
  .cropper-point.point-se {
    height: 15px;
    width: 15px;
  }
}

@media (min-width: 992px) {
  .cropper-point.point-se {
    height: 10px;
    width: 10px;
  }
}

@media (min-width: 1200px) {
  .cropper-point.point-se {
    height: 5px;
    opacity: 0.75;
    width: 5px;
  }
}

.cropper-point.point-se::before {
  background-color: #39f;
  bottom: -50%;
  content: ' ';
  display: block;
  height: 200%;
  opacity: 0;
  position: absolute;
  right: -50%;
  width: 200%;
}

.cropper-invisible {
  opacity: 0;
}

.cropper-bg {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
}

.cropper-hide {
  display: block;
  height: 0;
  position: absolute;
  width: 0;
}

.cropper-hidden {
  display: none !important;
}

.cropper-move {
  cursor: move;
}

.cropper-crop {
  cursor: crosshair;
}

.cropper-disabled .cropper-drag-box,
.cropper-disabled .cropper-face,
.cropper-disabled .cropper-line,
.cropper-disabled .cropper-point {
  cursor: not-allowed;
}
.modal {
  position: fixed;
  z-index: 1;
  padding: 1em;
  
  /* Centering */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  overflow: auto;
  
  /* Add the drop shadow */
 
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: black;
  text-decoration: none;
}

.hidden {
  display: none;
}
/**
 * tom-select.css (v2.2.2) - Custom styles for masjid CRM
 * Updated to match Tailwind select field styling
 */

:root {
  --ts-pr-clear-button: 0;
  --ts-pr-caret: 0;
  --ts-pr-min: .75rem;
}

.ts-wrapper.single .ts-control, .ts-wrapper.single .ts-control input {
  cursor: pointer;
}

.ts-control {
  padding-right: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important;
}

.ts-wrapper.plugin-drag_drop.multi > .ts-control > div.ui-sortable-placeholder {
  visibility: visible !important;
  background: #f2f2f2 !important;
  background: rgba(0, 0, 0, 0.06) !important;
  border: 0 none !important;
  box-shadow: inset 0 0 12px 4px #fff;
}
.ts-wrapper.plugin-drag_drop .ui-sortable-placeholder::after {
  content: "!";
  visibility: hidden;
}
.ts-wrapper.plugin-drag_drop .ui-sortable-helper {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.plugin-checkbox_options .option input {
  margin-right: 0.5rem;
}

.plugin-clear_button {
  --ts-pr-clear-button: 1em;
}
.plugin-clear_button .clear-button {
  opacity: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: calc(8px - 6px);
  margin-right: 0 !important;
  background: transparent !important;
  transition: opacity 0.5s;
  cursor: pointer;
}
.plugin-clear_button.form-select .clear-button, .plugin-clear_button.single .clear-button {
  right: max( var(--ts-pr-caret), 8px);
}
.plugin-clear_button.focus.has-items .clear-button, .plugin-clear_button:not(.disabled):hover.has-items .clear-button {
  opacity: 1;
}

.ts-wrapper .dropdown-header {
  position: relative;
  padding: 10px 8px;
  border-bottom: 1px solid #d1d5db;
  background: #f9fafb;
  border-radius: 0.5rem 0.5rem 0 0;
}
.ts-wrapper .dropdown-header-close {
  position: absolute;
  right: 8px;
  top: 50%;
  color: #374151;
  opacity: 0.4;
  margin-top: -12px;
  line-height: 20px;
  font-size: 20px !important;
}
.ts-wrapper .dropdown-header-close:hover {
  color: #111827;
}

.plugin-dropdown_input.focus.dropdown-active .ts-control {
  box-shadow: 0 0 0 1px #3b82f6;
  border: 1px solid #3b82f6;
}
.plugin-dropdown_input .dropdown-input {
  border: 1px solid #d1d5db;
  border-width: 0 0 1px 0;
  display: block;
  padding: 8px 8px;
  box-shadow: none;
  width: 100%;
  background: transparent;
}
.plugin-dropdown_input .items-placeholder {
  border: 0 none !important;
  box-shadow: none !important;
  width: 100%;
}
.plugin-dropdown_input.has-items .items-placeholder, .plugin-dropdown_input.dropdown-active .items-placeholder {
  display: none !important;
}

.ts-wrapper.plugin-input_autogrow.has-items .ts-control > input {
  min-width: 0;
}
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input {
  flex: none;
  min-width: 4px;
}
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-ms-input-placeholder {
  color: transparent;
}
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::placeholder {
  color: transparent;
}

.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content {
  display: flex;
}
.ts-dropdown.plugin-optgroup_columns .optgroup {
  border-right: 1px solid #f2f2f2;
  border-top: 0 none;
  flex-grow: 1;
  flex-basis: 0;
  min-width: 0;
}
.ts-dropdown.plugin-optgroup_columns .optgroup:last-child {
  border-right: 0 none;
}
.ts-dropdown.plugin-optgroup_columns .optgroup:before {
  display: none;
}
.ts-dropdown.plugin-optgroup_columns .optgroup-header {
  border-top: 0 none;
}

.ts-wrapper.plugin-remove_button .item {
  display: inline-flex;
  align-items: center;
  padding-right: 0 !important;
}
.ts-wrapper.plugin-remove_button .item .remove {
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
  display: inline-block;
  padding: 0 6px;
  border-radius: 0 0.125rem 0.125rem 0;
  box-sizing: border-box;
}
.ts-wrapper.plugin-remove_button .item .remove:hover {
  background: rgba(0, 0, 0, 0.05);
}
.ts-wrapper.plugin-remove_button.disabled .item .remove:hover {
  background: none;
}
.ts-wrapper.plugin-remove_button .remove-single {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 23px;
}

.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove {
  border-left: 1px solid #d1d5db;
  margin-left: 6px;
}
.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove {
  border-left-color: #9ca3af;
}
.ts-wrapper.plugin-remove_button:not(.rtl).disabled .item .remove {
  border-left-color: white;
}

.ts-wrapper.plugin-remove_button.rtl .item .remove {
  border-right: 1px solid #d1d5db;
  margin-right: 6px;
}
.ts-wrapper.plugin-remove_button.rtl .item.active .remove {
  border-right-color: #9ca3af;
}
.ts-wrapper.plugin-remove_button.rtl.disabled .item .remove {
  border-right-color: white;
}

/* Main wrapper - matches Tailwind bg-gray-50 */
.ts-wrapper {
  position: relative;
  background: #f9fafb;
  min-height: 2.625rem;
}

/* Typography matching Tailwind text-sm */
.ts-dropdown,
.ts-control,
.ts-control input {
  color: #111827;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-smoothing: inherit;
}

/* Control styling to match Tailwind select fields */
.ts-control,
.ts-wrapper.single.input-active .ts-control {
  background: #f9fafb;
  cursor: text;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.625rem;
  transition: all 0.15s ease-in-out;
  min-height: 2.625rem; /* Matches Tailwind p-2.5 + border height */
}

.ts-control {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  color: #111827;
}

/* Focus states to match Tailwind focus:ring-blue-500 focus:border-blue-500 */
.focus .ts-control {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
  outline: none;
}

.ts-wrapper.multi.has-items .ts-control {
  padding: calc(0.625rem - 2px - 0px) 0.625rem calc(0.625rem - 2px - 3px - 0px);
}

.full .ts-control {
  background-color: #f9fafb;
}

.disabled .ts-control, .disabled .ts-control * {
  cursor: default !important;
  opacity: 0.5;
  background-color: #f9fafb;
}

.ts-control > * {
  vertical-align: baseline;
  display: inline-block;
}

.ts-wrapper.multi .ts-control > div {
  cursor: pointer;
  margin: 0 3px 3px 0;
  padding: 2px 6px;
  background: #e5e7eb;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
}

.ts-wrapper.multi .ts-control > div.active {
  background: #d1d5db;
  color: #374151;
  border: 1px solid #9ca3af;
}

.ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active {
  color: #9ca3af;
  background: white;
  border: 1px solid white;
}

.ts-control > input {
  flex: 1 1 auto;
  min-width: 7rem;
  display: inline-block !important;
  padding: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
  margin: 0 !important;
  text-indent: 0 !important;
  border: 0 none !important;
  background: none !important;
  line-height: inherit !important;
  -webkit-user-select: auto !important;
     -moz-user-select: auto !important;
      -ms-user-select: auto !important;
          user-select: auto !important;
  box-shadow: none !important;
}

.ts-control > input::-ms-clear {
  display: none;
}

.ts-control > input:focus {
  outline: none !important;
}

/* Placeholder styling to match Tailwind placeholder colors */
.ts-control > input::placeholder {
  color: #9ca3af !important; /* matches text-gray-400 */
  opacity: 1;
}

.ts-control > input::-webkit-input-placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

.ts-control > input::-moz-placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

.ts-control > input:-ms-input-placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

/* Styling for prompt text when no selection is made */
.ts-wrapper.single .ts-control .ts-placeholder {
  color: white !important;
  opacity: 1;
}

/* When input is hidden but placeholder should show */
.ts-wrapper.single.input-hidden .ts-control:after {
  content: attr(data-placeholder);
  color: #9ca3af;
  position: absolute;
  top: 50%;
  left: 0.625rem;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Tom-select specific placeholder when no items selected */
.ts-wrapper.single:not(.has-items) .ts-control input {
  color: #9ca3af !important;
}

/* Override tom-select's default placeholder handling */
.ts-wrapper.single .ts-control input[placeholder] {
  color: #9ca3af !important;
}

.ts-wrapper.single .ts-control input:not([value=""]):not(:focus) {
  color: #111827 !important;
}

.has-items .ts-control > input {
  margin: 0px 4px !important;
}

.ts-control.rtl {
  text-align: right;
}

.ts-control.rtl.single .ts-control:after {
  left: 15px;
  right: auto;
}

.ts-control.rtl .ts-control > input {
  margin: 0px 4px 0px -2px !important;
}

.input-hidden .ts-control > input {
  opacity: 0;
  position: absolute;
  left: -10000px;
}

/* Dropdown styling */
.ts-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 10;
  border: 1px solid #d1d5db;
  background: #ffffff;
  margin: 0.25rem 0 0 0;
  border-top: 0 none;
  box-sizing: border-box;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 0.5rem 0.5rem;
}

.ts-dropdown [data-selectable] {
  cursor: pointer;
  overflow: hidden;
}

.ts-dropdown [data-selectable] .highlight {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.125rem;
}

.ts-dropdown .option,
.ts-dropdown .optgroup-header,
.ts-dropdown .no-results,
.ts-dropdown .create {
  padding: 0.5rem 0.75rem;
}

.ts-dropdown .option, .ts-dropdown [data-disabled], .ts-dropdown [data-disabled] [data-selectable].option {
  cursor: inherit;
  opacity: 0.5;
}

.ts-dropdown [data-selectable].option {
  opacity: 1;
  cursor: pointer;
}

.ts-dropdown .optgroup:first-child .optgroup-header {
  border-top: 0 none;
}

.ts-dropdown .optgroup-header {
  color: #374151;
  background: #f9fafb;
  cursor: default;
  font-weight: 500;
}

.ts-dropdown .active {
  background-color: #3b82f6;
  color: #ffffff;
}

.ts-dropdown .active.create {
  color: #ffffff;
}

.ts-dropdown .create {
  color: #6b7280;
}

.ts-dropdown .spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin: 5px 8px;
}

.ts-dropdown .spinner:after {
  content: " ";
  display: block;
  width: 24px;
  height: 24px;
  margin: 3px;
  border-radius: 50%;
  border: 5px solid #d1d5db;
  border-color: #d1d5db transparent #d1d5db transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ts-dropdown-content {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 200px;
  overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.ts-hidden-accessible {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  -webkit-clip-path: inset(50%) !important;
          clip-path: inset(50%) !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}

/* Dark mode styles to match dark:bg-gray-700 dark:border-gray-600 etc. */
@media (prefers-color-scheme: dark) {
  .ts-wrapper {
    background: #374151;
  }
  
  .ts-dropdown,
  .ts-control,
  .ts-control input {
    color: #ffffff;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-smoothing: inherit;
  }

  .ts-control,
  .ts-wrapper.single.input-active .ts-control {
    background: #374151;
    border-color: #4b5563;
    cursor: text;
    color: #ffffff;
    min-height: 2.625rem; /* Matches light mode height */
  }

  .ts-control {
    background: #374151;
  }

  .full .ts-control {
    background: #374151;
  }

  /* Dark mode focus states to match dark:focus:ring-blue-500 dark:focus:border-blue-500 */
  .focus .ts-control {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
  }

  /* Dark mode placeholder styling to match dark:placeholder-gray-400 */
  .ts-control > input::placeholder {
    color: #9ca3af !important;
    opacity: 1;
  }

  .ts-control > input::-webkit-input-placeholder {
    color: #9ca3af !important;
    opacity: 1;
  }

  .ts-control > input::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 1;
  }

  .ts-control > input:-ms-input-placeholder {
    color: #9ca3af !important;
    opacity: 1;
  }

  /* Dark mode prompt text */
  .ts-wrapper.single .ts-control .ts-placeholder {
    color: #9ca3af !important;
    opacity: 1;
  }

  .ts-wrapper.single.input-hidden .ts-control:after {
    color: #9ca3af;
  }

  /* Dark mode tom-select specific placeholder when no items selected */
  .ts-wrapper.single:not(.has-items) .ts-control input {
    color: #9ca3af !important;
  }

  /* Dark mode override tom-select's default placeholder handling */
  .ts-wrapper.single .ts-control input[placeholder] {
    color: #9ca3af !important;
  }

  .ts-wrapper.single .ts-control input:not([value=""]):not(:focus) {
    color: #ffffff !important;
  }

  .disabled .ts-control {
    background-color: #374151;
    opacity: 0.5;
  }

  .ts-wrapper.multi .ts-control > div {
    background: #4b5563;
    color: #ffffff;
    border: 1px solid #6b7280;
  }

  .ts-wrapper.multi .ts-control > div.active {
    background: #6b7280;
    color: #ffffff;
    border: 1px solid #9ca3af;
  }

  .ts-dropdown {
    border: 1px solid #4b5563;
    background: #374151;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.25), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  }

  .ts-dropdown [data-selectable] {
    background: #374151;
    color: #ffffff;
  }

  .ts-dropdown [data-selectable] .highlight {
    background: rgba(59, 130, 246, 0.2);
  }

  .ts-dropdown .active {
    background-color: #3b82f6;
    color: #ffffff;
  }

  .ts-dropdown .active.create {
    color: #ffffff;
  }

  .ts-dropdown .optgroup-header {
    color: #ffffff;
    background: #4b5563;
  }

  .ts-dropdown .create {
    color: #9ca3af;
  }

  .ts-wrapper .dropdown-header {
    background: #4b5563;
    border-bottom: 1px solid #6b7280;
  }

  .ts-wrapper .dropdown-header-close {
    color: #d1d5db;
  }

  .ts-wrapper .dropdown-header-close:hover {
    color: #ffffff;
  }

  .plugin-dropdown_input .dropdown-input {
    border-color: #4b5563;
  }

  .ts-dropdown .spinner:after {
    border: 5px solid #4b5563;
    border-color: #4b5563 transparent #4b5563 transparent;
  }

  [data-controller="membership-contact-search"] .ts-wrapper {
    @apply w-full rounded-lg;
  }

  [data-controller="membership-contact-search"] .ts-control {
    @apply bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5;
  }

  @media (prefers-color-scheme: dark) {
    [data-controller="membership-contact-search"] .ts-control {
      @apply bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-blue-500 focus:border-blue-500;
    }
    
    [data-controller="membership-contact-search"] .ts-dropdown {
      @apply bg-gray-700 border-gray-600;
    }
    
    [data-controller="membership-contact-search"] .ts-dropdown .option {
      @apply text-white;
    }
    
    [data-controller="membership-contact-search"] .ts-dropdown .option.active {
      @apply bg-blue-600;
    }
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *




 */
 
/* Add this to app/assets/stylesheets/custom.css or application.css */

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 40;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px); /* For Safari support */
}

.turbo-modal {
  position: fixed;
  z-index: 50;
  padding: 1em;
  
  /* Centering */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  overflow: auto;
  /* Remove any existing drop shadow, as we're now using the backdrop */
}

/* Standard form container width for all modals */
.modal-container {
  width: 768px;
  max-width: 90vw; /* Fallback for smaller screens */
  max-height: 80vh;
  overflow-y: auto;
}
