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

/*

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

*/

@import url('https://fonts.cdnfonts.com/css/open-sauce-one');
/* @import url('https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@100..900&display=swap'); */

@layer base {
  html {
    font-family: "Open Sauce One", sans-serif;
  }
}

@layer base {
  input:focus,
  select:focus,
  textarea:focus,
  button:focus {
    --tw-ring-color: #00AD6F !important;
  }

  textarea:focus {
    border-color: #00AD6F !important;
  }


  input[id^="search-"] {
    @apply text-sm;
  }

  input[id^="search-"]:focus {
    border-color: #00AD6F !important;
  }
}

@layer components {
  .gradient-text {
    @apply bg-gradient-to-tr from-[#008F5D] to-[#53E4B0] text-transparent bg-clip-text;
  }

  .gradient-border {
    position: relative;
  }

  .gradient-border::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #53E4B0, #E4FFD5);
  }
  .glass-border {
    @apply relative rounded-full;
  }

  .glass-border::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px; /* border thickness */
    border-radius: inherit;
    background: linear-gradient(163deg, white, rgba(0, 0, 0, 0), white);
    
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
  }
}
/* Default branding variables */
:root {
  --brand-color: #0078D4;
  --left-nav-color: #FFFFFF;
  --link-color: #0078D4;
  --primary-btn-color: #0078D4;
  --secondary-btn-color: #6C757D;
  --border-radius: 4px;
}

/* Light theme */
.theme-light {
  --text-color: #212529;
  --bg-color: #FFFFFF;
  --secondary-bg: #F8F9FA;
}

/* Dark theme */
.theme-dark {
  --text-color: #F8F9FA;
  --bg-color: #212529;
  --secondary-bg: #343A40;
}

/* Apply custom branding */
a {
  color: var(--link-color);
}

.btn-primary {
  background-color: var(--primary-btn-color);
  border-color: var(--primary-btn-color);
}

.btn-secondary {
  background-color: var(--secondary-btn-color);
  border-color: var(--secondary-btn-color);
}

.rounded-element {
  border-radius: var(--border-radius);
}

#desktop-sidebar {
  background-color: var(--left-nav-color);
}

.brand-color {
  color: var(--brand-color);
}

.brand-bg {
  background-color: var(--brand-color);
}

/* Additional theme-specific styling */
.theme-dark body {
  color: var(--text-color);
  background-color: var(--bg-color);
}

.theme-dark .card,
.theme-dark .modal-content {
  background-color: var(--secondary-bg);
  color: var(--text-color);
}
.task-grabber {
  transition: all 0.2s ease;
  cursor: grab;
}

.task-grabber-y:hover {
  width: 8px !important;
  opacity: 0.9;
}

.task-grabber-x:hover {
  height: 8px !important;
  opacity: 0.9;
}

.sortable-ghost {
  opacity: 0.6;
}

.sortable-drag {
  opacity: 0.9;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  cursor: grabbing !important;
}

[draggable="true"] {
  user-select: none;
}

[data-draggable-task-target="task"].opacity-50 {
  border: 1px dashed #ccc;
  background-color: #f9f9f9;
}

/* Old task stage highlight */
[data-draggable-task-target="taskStage"].gray-background {
  background-color: #f3f4f6;
  box-shadow: inset 0 0 0 2px rgba(0, 173, 111, 0.5);
  transition: all 0.2s ease;
  animation: pulse-border 1.5s infinite;
}

/* New column highlight */
.task-stage-dropzone-active {
  background-color: #f3f4f6 !important;
  box-shadow: inset 0 0 0 3px rgba(0, 173, 111, 0.5) !important;
  transition: all 0.2s ease;
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% {
    box-shadow: inset 0 0 0 2px rgba(0, 173, 111, 0.3);
  }
  50% {
    box-shadow: inset 0 0 0 3px rgba(0, 173, 111, 0.6);
  }
  100% {
    box-shadow: inset 0 0 0 2px rgba(0, 173, 111, 0.3);
  }
}
/*
 * 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.
 *


 */

.required:after {
  content:" *";
  color: red;
}

[x-cloak] {
  display: none !important;
}

.sidebar-active-item {
  border-left: 12px solid #00AD6F !important;
}

#date-picker-container-main {
  min-width: 200px;
  height: 40px;
  pointer-events: none;
}

.invisible-input-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#date-picker-input-main {
  cursor: pointer;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 13px;
  }
}

/* Voice Input Styles */
.voice-input-btn {
  transition: all 0.2s ease-in-out;
}

.voice-input-btn:hover {
  transform: scale(1.05);
}

.voice-input-btn:active {
  transform: scale(0.95);
}

.voice-input-btn.recording {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.price-decimal {
  display: inline-block;
  font-size: 0.7em;
  height: 1em;
  font-weight: 400;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Chat UI Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-message {
  animation: slideInLeft 0.3s ease-out;
}

.chat-message.user {
  animation: slideInRight 0.3s ease-out;
}

/* Loading dots animation */
@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.new-task-highlight {
  animation: highlight 3.5s ease-in-out;
}

@keyframes highlight {
  0% {
    background-color: rgba(0, 173, 111, 0.2);
  }
  25% {
    background-color: rgba(0, 173, 111, 0.4);
  }
  50% {
    background-color: rgba(0, 173, 111, 0.4);
  }
  75% {
    background-color: rgba(0, 173, 111, 0.6);
  }
  100% {
    background-color: transparent;
  }
}

.micro-shake tbody > tr {
}

.micro-shake {
  padding-bottom: 10px;
}

@keyframes shake {
  0% { transform:   rotateZ(0deg) }
  15% { transform:  rotateZ(-0.2deg) }
  30% { transform:  rotateZ(0.2deg) }
  45% { transform:  rotateZ(-0.2deg) }
  60% { transform:  rotateZ(0.2deg) }
  75% { transform:  rotateZ(-0.2deg) }
  90% { transform:  rotateZ(0.2deg) }
  100% { transform: rotateZ(0deg) }
}

/* air-datepicker – site palette: brand green #00AD6F + neutrals */

.air-datepicker {
  --adp-font-family: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --adp-font-size: 0.875rem;
  --adp-width: 246px;
  --adp-z-index: 40;
  --adp-padding: 4px;
  --adp-grid-areas: "nav" "body" "timepicker" "buttons";
  --adp-transition-duration: 0.15s;
  --adp-transition-ease: ease-out;
  --adp-transition-offset: 8px;
  /* Backgrounds – white + light gray hovers (match dialog) */
  --adp-background-color: #ffffff;
  --adp-background-color-hover: #f5f5f5;
  --adp-background-color-active: #e5e5e5;
  --adp-background-color-in-range: rgba(0, 173, 111, 0.12);
  --adp-background-color-in-range-focused: rgba(0, 173, 111, 0.18);
  --adp-background-color-selected-other-month-focused: #f0f9f5;
  --adp-background-color-selected-other-month: #e8f5ee;
  /* Text – site grays */
  --adp-color: #303538;
  --adp-color-secondary: #737373;
  --adp-accent-color: #00AD6F;
  --adp-color-current-date: #00AD6F;
  --adp-color-other-month: #a3a3a3;
  --adp-color-disabled: #a3a3a3;
  --adp-color-disabled-in-range: #737373;
  --adp-color-other-month-hover: #737373;
  /* Borders */
  --adp-border-color: #e5e5e5;
  --adp-border-color-inner: #e5e5e5;
  --adp-border-radius: 0.5rem;
  --adp-border-color-inline: #d4d4d4;
  --adp-nav-height: 32px;
  --adp-nav-arrow-color: var(--adp-color-secondary);
  --adp-nav-action-size: 32px;
  --adp-nav-color-secondary: var(--adp-color-secondary);
  --adp-day-name-color: #525252;
  --adp-day-name-color-hover: #f5f5f5;
  --adp-day-cell-width: 1fr;
  --adp-day-cell-height: 32px;
  --adp-month-cell-height: 42px;
  --adp-year-cell-height: 56px;
  --adp-pointer-size: 10px;
  --adp-poiner-border-radius: 2px;
  --adp-pointer-offset: 14px;
  --adp-cell-border-radius: 0.375rem;
  --adp-cell-background-color-hover: #f0f9f5;
  --adp-cell-background-color-selected: #00AD6F;
  --adp-cell-background-color-selected-hover: #009a62;
  --adp-cell-background-color-in-range: rgba(0, 173, 111, 0.2);
  --adp-cell-background-color-in-range-hover: rgba(0, 173, 111, 0.28);
  --adp-cell-border-color-in-range: #00AD6F;
  --adp-btn-height: 32px;
  --adp-btn-color: #00AD6F;
  --adp-btn-color-hover: var(--adp-color);
  --adp-btn-border-radius: var(--adp-border-radius);
  --adp-btn-background-color-hover: var(--adp-background-color-hover);
  --adp-btn-background-color-active: var(--adp-background-color-active);
  --adp-time-track-height: 1px;
  --adp-time-track-color: #d4d4d4;
  --adp-time-track-color-hover: #a3a3a3;
  --adp-time-thumb-size: 12px;
  --adp-time-padding-inner: 10px;
  --adp-time-day-period-color: var(--adp-color-secondary);
  --adp-mobile-font-size: 1rem;
  --adp-mobile-nav-height: 40px;
  --adp-mobile-width: 320px;
  --adp-mobile-day-cell-height: 38px;
  --adp-mobile-month-cell-height: 48px;
  --adp-mobile-year-cell-height: 64px;
}

.air-datepicker-overlay {
  --adp-overlay-background-color: rgba(0, 0, 0, 0.3);
  --adp-overlay-transition-duration: 0.15s;
  --adp-overlay-transition-ease: ease-out;
  --adp-overlay-z-index: 99;
}

.air-datepicker {
  background: var(--adp-background-color);
  border: 1px solid var(--adp-border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  border-radius: var(--adp-border-radius);
  box-sizing: content-box;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, max-content);
  grid-template-areas: var(--adp-grid-areas);
  font-family: var(--adp-font-family), sans-serif;
  font-size: var(--adp-font-size);
  color: var(--adp-color);
  width: var(--adp-width);
  position: absolute;
  transition: opacity var(--adp-transition-duration) var(--adp-transition-ease),
    transform var(--adp-transition-duration) var(--adp-transition-ease);
  z-index: var(--adp-z-index);
}

.air-datepicker--navigation {
  width: 100%;
}

.air-datepicker--pointer {
  opacity: 0;
}

.air-datepicker-cell.-selected-,
.air-datepicker-cell.-selected-.-day-,
.air-datepicker-cell.-selected-.-year-,
.air-datepicker-cell.-selected-.-month-,
.air-datepicker-cell.-selected-.-current- {
  color: #ffffff;
  border: none;
  background: var(--adp-cell-background-color-selected);
}

.air-datepicker-cell.-current- {
  border: 1px solid #00AD6F !important;
  color: #00AD6F;
}

.air-datepicker-cell.-selected-.-day-.-other-month- {
  color: #ffffff;
  background: #00AD6F;
}

.air-datepicker-cell.-disabled- {
  cursor: not-allowed;
}

/* Time-only picker */
.air-datepicker.only-timepicker .air-datepicker--navigation {
  display: none;
}

.air-datepicker.only-timepicker .air-datepicker--content {
  display: none;
}

.air-datepicker.only-timepicker .air-datepicker--time {
  border-top: none;
}

.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 1050;
}

.bottom-sheet.hidden {
  display: none;
}

.bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}

.bottom-sheet-backdrop.show {
  background: rgba(0,0,0,0.4);
}

.bottom-sheet-panel::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  width: 5rem;
  height: 0.25rem;
  border-radius: 4px;
  background: var(--background-color);
  z-index: 1051;
}

.bottom-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  background: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;

  transform: translateY(100%);
  transition: transform 0.3s ease;

  max-height: 90vh;
  padding: 1rem;
  display: flex;
  flex-direction: column;

  @supports (height: 100dvh) {
    max-height: 90dvh;
  }
}

.bottom-sheet-panel.show {
  transform: translateY(0);
}
