@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);
  }
}
/* 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"].bg-gray-100 {
  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 {
  animation: shake 0.9s ease-in-out infinite;
  transform-origin: center center;
  transform-box: fill-box;
}

.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) }
}
