@import "tailwindcss";


@plugin "daisyui";

@keyframes marquee-full {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.animate-marquee-full {
  animation: marquee-full 40s linear infinite;
}

/* HTMX Styles */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: flex;
}

.htmx-request.htmx-indicator {
  display: flex;
}

/* Loading Animation */
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Global body scroll - allow scrolling by default */
body {
  overflow-y: auto;
}

/* Chat page specific - prevent body scrolling */
body.chat-page {
  overflow: hidden;
  height: 100vh;
  position: fixed;
  width: 100%;
}

/* Navbar Styles - Ensure white background and visibility */
.navbar {
    @apply bg-white shadow-sm border-b border-gray-200;
    background-color: white !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    width: 100% !important;
    height: 64px !important;
}

.navbar.bg-base-100 {
    background-color: white !important;
}

/* Chat container - positioned below navbar */
.chat-container {
    background-color: #f9fafb !important;  /* Changed to gray-50 */
    overflow: hidden;
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10;
    height: calc(100vh - 64px) !important;
}

/* Chat list container - allow scrolling */
.chat-container .flex-1.overflow-y-auto {
    overflow-y: auto !important;
}

/* Messages container - allow scrolling */
#messages-container {
    overflow-y: auto !important;
}

/* Card-based Chat Layout */
.chat-container .max-w-7xl {
    max-width: 80rem;
}

.chat-container .h-\[calc\(100vh-200px\)\] {
    height: calc(100vh - 200px);
    min-height: 600px;
}

.chat-container .rounded-lg {
    border-radius: 0.5rem;
}

.chat-container .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.chat-container .w-1\/3 {
    width: 33.333333%;
    min-width: 320px;
    max-width: 400px;
}

.chat-container .flex-1 {
    flex: 1;
    min-width: 0;
}

/* Chat List Styles */
.chat-item {
    @apply transition-all duration-200;
    border-left: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.chat-item.bg-blue-50 {
    border-bottom: none !important;
    border-bottom-width: 0 !important;
}

.chat-item:hover {
    @apply bg-gray-50;
}

.chat-item.bg-blue-50 {
    @apply bg-blue-50;
    border-left: none !important;
    border-left-width: 0 !important;
}

/* Unread indicator styles */
.unread-indicator {
    @apply flex-shrink-0;
}

.unread-indicator div {
    @apply w-5 h-5 bg-blue-500 text-white text-xs rounded-full flex items-center justify-center;
    min-width: 20px;
    height: 20px;
}

/* Chat avatar styles are now inline */

/* Chat Message Styles - Using DaisyUI chat component */
.chat {
    @apply mb-4;
}

.chat-bubble {
    @apply text-center;
    word-break: break-word;
    white-space: pre-line;
    min-width: 60px;
    max-width: 400px;
    width: fit-content;
    padding: 12px 16px;
}

/* Custom chat bubble colors with higher specificity */
.chat.chat-start .chat-bubble {
    background-color: #e5e7eb !important;
    color: #1f2937 !important;
}

.chat.chat-end .chat-bubble {
    background-color: #3b82f6 !important;
    color: white !important;
}

/* Additional specificity to override DaisyUI */
#messages-container .chat.chat-start .chat-bubble {
    background-color: #e5e7eb !important;
    color: #1f2937 !important;
}

#messages-container .chat.chat-end .chat-bubble {
    background-color: #3b82f6 !important;
    color: white !important;
}

/* Responsive bubble sizing */
@media (max-width: 768px) {
    .chat-bubble {
        max-width: 280px;
        min-width: 50px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .chat-bubble {
        max-width: 240px;
        min-width: 40px;
        padding: 8px 12px;
    }
}

/* Chat container layout fixes */
#chat-room-content {
    @apply flex flex-col;
    height: 100%;
}

#messages-container {
    @apply flex-1 overflow-y-auto;
    min-height: 0;
    max-height: calc(100vh - 300px);
}

/* Ensure input stays at bottom */
#chat-room-content > div:last-child {
    @apply flex-shrink-0;
}

/* Chat layout alignment with navbar */
.chat-container .max-w-7xl {
    @apply mx-auto;
}

/* Align chat container with navbar logo */
@media (min-width: 1024px) {
    .chat-container {
        margin-left: 6rem; /* Same as navbar logo px-24 */
        margin-right: 6rem; /* Same as navbar-end px-24 */
    }
}

@media (max-width: 1023px) {
    .chat-container {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

/* Dropdown styles */
.dropdown {
    @apply relative;
}

.dropdown-content {
    @apply absolute top-full right-0 mt-1;
}

.dropdown-end .dropdown-content {
    @apply right-0 left-auto;
}

/* Chat dropdown styles */
.chat-dropdown .dropdown-content {
    @apply bg-white border border-gray-200 shadow-lg;
}

.chat-dropdown .dropdown-content li a {
    @apply hover:bg-gray-100 transition-colors;
}

/* Admin sidebar dropdown styles */
.admin-sidebar details {
    @apply relative;
}

.admin-sidebar details[open] {
    @apply block;
}

.admin-sidebar details ul {
    @apply bg-[#111827] mt-2 ml-4 p-2 rounded-lg space-y-1;
}

.admin-sidebar details ul li a {
    @apply hover:bg-[#374151] py-1 px-2 rounded block text-[#9CA3AF] text-[17px];
}

/* Prevent dropdown from closing when clicking sub menu */
.admin-sidebar details ul li a:hover {
    @apply bg-[#374151];
}

/* Modal and Alert z-index fixes */
.modal {
    z-index: 9999 !important;
    position: fixed !important;
}

.modal-box {
    z-index: 10000 !important;
    position: relative !important;
}

.alert {
    z-index: 9999 !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    max-width: 24rem !important;
}

.alert-info,
.alert-success,
.alert-warning,
.alert-error {
    z-index: 9999 !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    max-width: 24rem !important;
}

/* Ensure alerts appear above navbar */
.alert,
.alert-info,
.alert-success,
.alert-warning,
.alert-error {
    margin-top: 5rem !important; /* Add top margin to appear below navbar */
}



/* Chat input styles */
.chat-input-container {
    @apply bg-white border-t border-gray-200;
}

.chat-input {
    @apply flex-1 border-0 focus:ring-0 focus:outline-none;
    background: transparent;
}

/* Profile sidebar styles */
#profile-sidebar {
    @apply fixed right-0 top-0 h-full w-80 bg-white shadow-lg transform translate-x-full transition-transform duration-300 ease-in-out z-50;
}

#profile-sidebar.show {
    @apply translate-x-0;
}

#profile-overlay {
    @apply fixed inset-0 bg-black z-40;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Scrollbar styles for chat containers */
.chat-container .flex-1::-webkit-scrollbar {
    width: 6px;
}

.chat-container .flex-1::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

.chat-container .flex-1::-webkit-scrollbar-thumb {
    @apply bg-gray-300 rounded-full;
}

.chat-container .flex-1::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400;
}

#messages-container::-webkit-scrollbar {
    width: 6px;
}

#messages-container::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

#messages-container::-webkit-scrollbar-thumb {
    @apply bg-gray-300 rounded-full;
}

#messages-container::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400;
}

/* Responsive design */
@media (max-width: 1024px) {
    .chat-container .w-1\/3 {
        width: 40%;
        min-width: 280px;
    }
    
    .chat-container .h-\[calc\(100vh-200px\)\] {
        height: calc(100vh - 180px);
    }
}

@media (max-width: 768px) {
    .chat-container .flex {
        @apply flex-col;
    }
    
    .chat-container .w-1\/3 {
        width: 100%;
        max-width: none;
        height: 50%;
    }
    
    .chat-container .flex-1 {
        height: 50%;
    }
    
    .chat-container .h-\[calc\(100vh-200px\)\] {
        height: calc(100vh - 160px);
    }
    
    .chat-message-incoming,
    .chat-message-outgoing {
        max-width: 250px;
    }
    
    #profile-sidebar {
        width: 100%;
    }
}

/* Additional chat sidebar styles */
.chat-sidebar {
    @apply bg-white border-r border-gray-200 flex flex-col;
}

.chat-sidebar .flex-1 {
    @apply overflow-y-auto;
}

.chat-sidebar .flex-1::-webkit-scrollbar {
    width: 4px;
}

.chat-sidebar .flex-1::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

.chat-sidebar .flex-1::-webkit-scrollbar-thumb {
    @apply bg-gray-300 rounded-full;
}

.chat-sidebar .flex-1::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400;
}

.chat-sidebar .border-b:hover {
    @apply bg-gray-50;
}

.chat-sidebar .bg-blue-50 {
    @apply bg-blue-50;
    border-left: none !important;
    border-left-width: 0 !important;
    border-bottom: none !important;
    border-bottom-width: 0 !important;
}

/* Enhanced message styles */
.chat-message-incoming {
    @apply bg-gray-100 text-gray-900 rounded-lg px-4 py-3 shadow-sm;
    max-width: 300px;
    word-break: break-word;
    white-space: pre-line;
    width: fit-content;
    position: relative;
}

.chat-message-outgoing {
    @apply bg-blue-500 text-white rounded-lg px-4 py-3 shadow-sm;
    max-width: 300px;
    word-break: break-word;
    white-space: pre-line;
    width: fit-content;
    position: relative;
}

/* Chat input container */
.chat-input-container form {
    @apply flex items-center space-x-2 p-3;
}

.chat-input {
    @apply flex-1 border-0 focus:ring-0 focus:outline-none;
    background: transparent;
    padding: 0.5rem;
}

.btn-circle.btn-sm {
    @apply w-8 h-8 min-h-0;
}

.btn-primary {
    @apply bg-blue-500 hover:bg-blue-600 text-white;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chat-sidebar {
        @apply w-full;
    }
    
    .chat-message-incoming,
    .chat-message-outgoing {
        max-width: 200px;
    }
}

/* Admin layout styles */
#admin-layout.sidebar-open #sidebar {
    @apply translate-x-0;
}

#admin-layout.sidebar-open #main-content {
    @apply ml-64;
}

#admin-layout.sidebar-closed #sidebar {
    @apply -translate-x-full;
}

#admin-layout.sidebar-closed #main-content {
    @apply ml-0;
}

#sidebar {
    @apply fixed left-0 top-0 h-full w-64 bg-white shadow-lg transform transition-transform duration-300 ease-in-out z-40;
}

.sidebar-open #sidebar {
    @apply translate-x-0;
}

.sidebar-open #main-content {
    @apply ml-64;
}

.sidebar-closed #sidebar {
    @apply -translate-x-full;
}

.sidebar-closed #main-content {
    @apply ml-0;
}

#main-content {
    @apply flex-1 transition-all duration-300 ease-in-out;
    min-height: calc(100vh - 64px);
}

@media (max-width: 768px) {
    #sidebar {
        @apply w-full;
    }
    
    .sidebar-closed #sidebar {
        @apply -translate-x-full;
    }
    
    .sidebar-open #sidebar {
        @apply translate-x-0;
    }
    
    #main-content {
        @apply ml-0;
    }
}

@media (max-width: 768px) {
    .sidebar-open::before {
        content: '';
        @apply fixed inset-0 bg-black z-30;
        background-color: rgba(0, 0, 0, 0.5);
    }
}

@plugin "daisyui/theme" {
  name: "cari";
  default: true;
  prefersdark: false;
  color-scheme: light;

  --color-base-100: oklch(98% 0 0);
  --color-base-200: oklch(96% 0.001 286.375);
  --color-base-300: oklch(92% 0.004 286.32);
  --color-base-content: oklch(21% 0.006 285.885);
  --color-primary: oklch(0.6078 0.1826 252.31);
  --color-primary-hover: oklch(0.6078_0.1826_252.31/0.85);
  --color-primary-content: oklch(100% 0 0);
  --color-secondary: oklch(81% 0.111 293.571);
  --color-secondary-content: oklch(28% 0.141 291.089);
  --color-accent: oklch(83% 0.128 66.29);
  --color-accent-content: oklch(26% 0.079 36.259);
  --color-neutral: oklch(27% 0.006 286.033);
  --color-neutral-content: oklch(98% 0 0);
  --color-info: oklch(78% 0.154 211.53);
  --color-info-content: oklch(30% 0.056 229.695);
  --color-success: oklch(76% 0.177 163.223);
  --color-success-content: oklch(26% 0.051 172.552);
  --color-warning: oklch(82% 0.189 84.429);
  --color-warning-content: oklch(27% 0.077 45.635);
  --color-error: oklch(71% 0.194 13.428);
  --color-error-content: oklch(27% 0.105 12.094);

}

/* Ensure dropdown menus stay visible */
.dropdown-content {
    z-index: 1001 !important;
}

/* Chat dropdown specific */
.chat-dropdown .dropdown-content {
    z-index: 1002 !important;
}

/* Admin Navbar Styles */
.admin-sidebar {
    background-color: #111827 !important;
}

/* Ensure admin navbar is visible and not affected by chat styles */
body:not(.chat-page) .navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background-color: white !important;
}

/* Admin specific navbar */
.admin-base .navbar {
    background-color: white !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Ensure dropdown menus in admin work properly */
.admin-base .dropdown-content {
    z-index: 1001 !important;
}

/* Navbar Profile Picture Styles */
.navbar .avatar .w-10 {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}

.navbar .avatar .w-10 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.navbar .avatar .w-10 .w-6 {
    width: 1.5rem;
    height: 1.5rem;
    color: #9ca3af;
}

/* Ensure profile picture is visible */
.navbar .btn-ghost.btn-circle.avatar {
    background-color: transparent;
    border: none;
    padding: 0;
}

.navbar .btn-ghost.btn-circle.avatar:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Project Create Form Styles */
.form-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 16px;
    margin-bottom: 16px;
}

/* Small screens and up */
@media (min-width: 640px) {
    .form-card {
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 20px;
    }
}

/* Medium screens and up */
@media (min-width: 768px) {
    .form-card {
        padding: 24px;
        margin-bottom: 24px;
    }
}

/* Input styling based on the image */
.input {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    min-height: 44px;
}

/* Ensure select dropdown is properly styled */
.input select {
    background-color: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #111827;
}

.input select:focus {
    outline: none;
}

.input select option {
    color: #111827;
}

/* Small screens and up */
@media (min-width: 640px) {
    .input {
        padding: 12px 16px;
    }
}

.input:focus {
    background-color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.input::placeholder {
    color: #9ca3af;
}

/* Breadcrumb styling */
.breadcrumbs {
    margin-bottom: 24px;
}

.breadcrumbs ul {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
}

.breadcrumbs li a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs li a:hover {
    color: #3b82f6;
}

.breadcrumbs li:last-child {
    color: #3b82f6;
}

/* Form grid layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field.full-width {
    grid-column: span 1;
}

.form-field.half-width {
    grid-column: span 1;
}

.form-field.third-width {
    grid-column: span 1;
}

/* Small screens and up */
@media (min-width: 640px) {
    .form-grid {
        gap: 20px;
    }

    .form-field {
        margin-bottom: 20px;
    }
}

/* Medium screens and up */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .form-field {
        margin-bottom: 24px;
    }

    .form-field.full-width {
        grid-column: span 2;
    }

    .form-field.half-width {
        grid-column: span 1;
    }

    .form-field.third-width {
        grid-column: span 1;
    }
}

/* Large screens and up */
@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 24px;
    }

    .form-field.full-width {
        grid-column: span 6;
    }

    .form-field.half-width {
        grid-column: span 3;
    }

    .form-field.third-width {
        grid-column: span 2;
    }
}

/* Label styling */
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 8px;
}

.required {
    color: #ef4444;
    margin-left: 4px;
}

/* Helper text styling */
.helper-text {
    font-size: 12px;
    color: #3b82f6;
    margin-top: 4px;
}

/* Error styling */
.error-text {
    font-size: 14px;
    color: #ef4444;
    margin-top: 4px;
}

/* Button styling */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

/* Button outline variant - fix missing borders */
.btn-outline {
    background-color: transparent !important;
    border: 1px solid currentColor !important;
}

.btn-outline:hover {
    background-color: currentColor !important;
    color: white !important;
}

/* Specific outline colors */
.btn-outline.btn-primary {
    color: #3b82f6;
    border-color: #3b82f6;
}

.btn-outline.btn-error {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-outline:not(.btn-primary):not(.btn-error):not(.btn-success):not(.btn-warning):not(.btn-info) {
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-outline:not(.btn-primary):not(.btn-error):not(.btn-success):not(.btn-warning):not(.btn-info):hover {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
}

/* Small screens and up */
@media (min-width: 640px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Fix ghost buttons with colored text */
.btn-ghost {
    background-color: transparent;
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Chat input buttons - make them visible */
.chat-input-container .btn-ghost {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-container .btn-ghost:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.chat-input-container .btn-ghost svg {
    width: 20px;
    height: 20px;
}

.btn-ghost.text-primary,
.btn-ghost.text-\[\#16A34A\] {
    color: var(--color-primary, #3b82f6);
}

.btn-ghost.text-red-500,
.btn-ghost.text-\[\#F87171\] {
    color: #ef4444;
}

/* Modal specific button fixes */
.modal .btn {
    border-width: 1px;
    border-style: solid;
}

/* Admin table button fixes */
.btn-ghost.text-primary {
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.btn-ghost.text-primary:hover {
    background-color: #3b82f6;
    color: white;
}

.btn-ghost.text-red-500 {
    color: #ef4444;
    border: 1px solid #ef4444;
}

.btn-ghost.text-red-500:hover {
    background-color: #ef4444;
    color: white;
}

.btn-ghost.text-\[\#16A34A\] {
    color: #16A34A;
    border: 1px solid #16A34A;
}

.btn-ghost.text-\[\#16A34A\]:hover {
    background-color: #16A34A;
    color: white;
}

.btn-ghost.text-\[\#F87171\] {
    color: #F87171;
    border: 1px solid #F87171;
}

.btn-ghost.text-\[\#F87171\]:hover {
    background-color: #F87171;
    color: white;
}

.modal .btn-outline {
    border-color: #d1d5db !important;
    color: #374151 !important;
}

.modal .btn-outline:hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #9ca3af !important;
}

.modal .btn-primary {
    border-color: #3b82f6 !important;
}

.modal .btn-error {
    border-color: #dc2626 !important;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-preview {
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Budget range styling */
.budget-range {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Label with input inside styling */
.budget-range .input {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.budget-range .input:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.budget-range .input input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 14px;
}

.budget-range .input input::placeholder {
    color: #9ca3af;
}

/* Small screens and up */
@media (min-width: 640px) {
    .budget-range .input {
        padding: 12px 16px;
    }
}

/* Small screens and up */
@media (min-width: 640px) {
    .budget-range {
        gap: 10px;
    }
}

/* Medium screens and up */
@media (min-width: 768px) {
    .budget-range {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .budget-range .input {
        flex: 1;
    }
}

