@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;700&display=swap');

.data-row td:has(img),
.data-row .field-my_prompt,
.data-row .field-pic,
.data-row .field-pic_comic,
.data-row .field-pic_refine,
.data-row .field-pic_first,
.data-row .field-pic_last,
.data-row .field-action_pic,
.data-row .field-prompt,
.data-row .field-prompt_refine,
.data-row .field-text,
.data-row .field-prompt_voice,
.data-row .field-sample_text,
.data-row .field-prompt_video,
.data-row .field-prompt_comic,
.data-row .field-video_player,
.data-row .field-last_logs
{
    height: fit-content;
    flex-direction: column;
    align-items: end;
    line-height: 20px;
    align-content: flex-start;
}

.ajax-help-text {
    font-size: 10px;
    margin-top: 4px;
    font-weight: 400;
    color: #9ca3af; /* Gray 400 */
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.025em;
}

.dark .ajax-help-text {
    color: #6b7280; /* Gray 500 */
}

/* Apply light font and custom color to desktop headers and responsive mobile labels */
.unfold-table thead th, 
.changelist-form table thead th,
.unfold-table th,
.unfold-table td::before {
    font-family: 'Inter', sans-serif !important;
    font-weight: 300 !important;
    color: #6b7280 !important; /* Tailwind gray-500 for a lighter look */
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 200 !important;
    color: var(--color-font-subtle-light) !important;
    text-transform: none !important;
    letter-spacing: 0.05em;
}

/* Dark mode overrides for headers */
.dark .unfold-table thead th, 
.dark .unfold-table th,
.dark .unfold-table td::before {
    color: #9ca3af !important; /* Gray 400 */
    color: var(--color-font-subtle-dark) !important;
}

/* Links and row text lighter than the responsive headers (#6b7280) */
.unfold-table tbody td,
.data-row td {
    font-family: 'Inter', sans-serif !important;
    font-weight: 300 !important;
    color: #9ca3af !important;
}

.unfold-table tbody td a,
.changelist-form table tbody td a,
.unfold-table td a,
.result-list a,
.data-row a {
    color: var(--color-primary-600) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Dark mode overrides for row text and links - lighter than headers */
.dark .unfold-table tbody td,
.dark .data-row td {
    color: #d1d5db !important; /* Gray 300 */
}

.dark .unfold-table tbody td a,
.dark .changelist-form table tbody td a,
.dark .unfold-table td a,
.dark .result-list a,
.dark .data-row a {
    color: var(--color-primary-400) !important;
}

.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6  {
    font-weight: bold; 
}

/* Highlight the main object link in changelists (usually the first column) */
.unfold-table .field-__str__ a,
.unfold-table th.field-__str__ a,
.unfold-table a,
.unfold-table a.text-font-important-light
{
    color: var(--color-primary-600) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

.dark .unfold-table .field-__str__ a,
.dark .unfold-table .field-__str__ a,
.dark .unfold-table th.field-__str__ a,
.dark .unfold-table a.dark\:text-font-important-dark {
    color: var(--color-primary-400) !important;
}

.unfold-table tbody td a:hover {
    color: #4f46e5 !important; /* Indigo hover state */
}

/* 10. Customize Changelist Table Headers and Responsive Labels */
.unfold-table thead th,
.unfold-table thead th a,
.unfold-table thead th .text {
    color: var(--color-font-default-light) !important;
    font-weight: 500 !important;
    color: var(--color-font-subtle-light) !important;
    font-weight: 200 !important;
    text-transform: none !important;
}

.dark .unfold-table thead th,
.dark .unfold-table thead th a,
.dark .unfold-table thead th .text {
    color: var(--color-font-default-dark) !important;
    color: var(--color-font-subtle-dark) !important;
}

/* Target the responsive labels used in mobile view to make them less prominent */
.unfold-table [data-label]::before {
    color: var(--color-font-default-light) !important;
    font-weight: 500 !important;
    color: var(--color-font-subtle-light) !important;
    font-weight: 200 !important;
}

.dark .unfold-table [data-label]::before {
    color: var(--color-font-default-dark) !important;
    color: var(--color-font-subtle-dark) !important;
}

/* Audio Player Styling */
audio {
    height: 32px;
    width: 100%;
    min-width: 200px;
    max-width: 280px;
    border-radius: 8px;
    background-color: #f3f4f6; /* Tailwind gray-100 */
    transition: all 0.2s ease;
}

.dark audio {
    /* This filter makes native browser audio controls look native to dark mode */
    filter: invert(100%) hue-rotate(180deg) brightness(1.4);
    background-color: transparent;
}

/* Video Player Styling */
video {
    max-height: 200px;
    width: 100%;
    min-width: 200px;
    max-width: 300px;
    border-radius: 8px;
    background-color: #000;
}

.dark video {
    border: 1px solid var(--color-border-primary, #374151);
}

/* Markdown Content Styling & Readability */
.markdown {
    font-family: 'Inter', sans-serif !important;
}

.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 {
    font-weight: 700 !important;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.25;
    color: var(--color-font-important-light, #111827) !important;
}

.dark .markdown h1, 
.dark .markdown h2, 
.dark .markdown h3, 
.dark .markdown h4, 
.dark .markdown h5, 
.dark .markdown h6 {
    color: #ffffff !important; /* Maximum contrast white for titles in dark mode */
}

.markdown p, .markdown ul, .markdown ol {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--color-font-default-light, #374151) !important;
    font-weight: 400 !important; /* Thicker than table default for readability */
}

.dark .markdown p, 
.dark .markdown ul, 
.dark .markdown ol, 
.dark .markdown li {
    color: #e5e7eb !important; /* Lighter gray for body text in dark mode */
    font-weight: 400 !important;
}

.dark .markdown strong {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Ensure lists are correctly styled and visible */
.markdown ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-left: 0.5rem !important;
}

.markdown ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-left: 0.5rem !important;
}

.markdown li {
    margin-bottom: 0.5rem !important;
    display: list-item !important;
}

.markdown li > p {
    display: inline !important; /* Prevents awkward breaks in bulleted items */
    margin: 0 !important;
    padding: 0 !important;
}

.dark .markdown {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Ensure all text within markdown in dark mode is light */
    color: #e5e7eb !important;
}

/* Force text color for prose content in dark mode */
.dark .prose {
    color: #d1d5db; /* gray-300 */
}

/* Slideshow (Swiper) Custom Styles */
.slideshow-container {
    background-color: #030712;
    min-height: 100vh;
}

.slide-card {
    transition: all 0.3s ease;
    max-width: 800px;
    width: 95%;
}

.dark .slide-card {
    background-color: #111827;
    border: 1px solid #1f2937;
}

@media (max-width: 768px) {
    .slide-card {
        height: 100%;
        width: 100%;
        border-radius: 0;
    }
    .media-container {
        flex: 1 1 auto;
    }
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Override for dropdown menu items within .field-items to remove default background */
/* This targets the <a> tags inside the <el-menu> within a .field-items context,
   ensuring they inherit the dropdown's background by default. */
.field-items .el-menu a {
    background-color: transparent !important; /* Remove the default background */
    border: none !important; /* Remove the default border */
    
    /* Re-apply padding and font size from the HTML template to ensure consistency,
       as the general .field-items a rule might have overridden them. */
    padding: 0.375rem 0.75rem !important; /* Corresponds to py-1.5 px-3 in your HTML */
    font-size: 1rem !important; /* Corresponds to text-[11px] in your HTML */
    /* Re-apply text colors from the HTML template, overriding the general .field-items a rule */
    color: var(--color-font-secondary-light) !important;
}

.dark .field-items .el-menu a {
    color: var(--color-white) !important; /* For dark mode, matches dark:text-white in your HTML */
}
/* The hover styles (e.g., hover:bg-base-100, dark:hover:bg-white/[.05], hover:text-primary-600,
   dark:hover:text-primary-400) from the HTML template will now correctly apply on top of the transparent background. */

/* Custom highlight using the primary-300 shade */
.bg-primary-light {
    background-color: var(--color-primary-300) !important;
    color: var(--color-base-900) !important;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

/* Items Dropdown & Status Triggers (Slate Blue Strategy) */
.field-items a,
.items-dropdown-trigger,
[id^="task-"] .dropdown-toggle,
[id^="task-"] select {
    color: var(--color-base-700) !important;
    background-color: var(--color-base-100) !important;
    font-weight: 500 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.dark .field-items a,
.dark .items-dropdown-trigger,
.dark [id^="task-"] .dropdown-toggle {
    color: var(--color-base-300) !important;
    background-color: var(--color-base-800) !important;
    border-color: var(--color-base-700) !important;
}

/* Custom Badge Colors for Amber and Lime */
.bg-amber-600{
    --tw-bg-opacity: 1;
    --tw-text-opacity: 1;
    background-color: rgb(252 211 77 / var(--tw-bg-opacity)); /* amber-300 */
    color: rgb(180 83 9 / var(--tw-text-opacity)); /* amber-700 */
    border-radius: 9999px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.bg-lime-600 {
    --tw-bg-opacity: 1;
    --tw-text-opacity: 1;
    background-color: rgb(190 242 100 / var(--tw-bg-opacity)); /* lime-300 */
    color: rgb(77 124 15 / var(--tw-text-opacity)); /* lime-700 */
    border-radius: 9999px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Section Header Styling */
.section-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 1.125rem !important; /* text-lg */
    letter-spacing: -0.01em;
    padding-bottom: 0.5rem; /* pb-2 */
    margin-bottom: 1rem; /* mb-4 */
    border-bottom: 1px solid;
    border-color: var(--color-base-200) !important;
    color: var(--color-base-800) !important;
}

.dark .section-title {
    border-color: var(--color-base-800) !important;
    color: var(--color-base-100) !important;
}

/* Adjustments for collapsible section titles */
.section-title button {
    font-weight: 500 !important;
    font-size: 1.125rem !important;
    color: var(--color-base-800) !important;
}
.dark .section-title button {
    color: var(--color-base-100) !important;
}

/* Chat Image Styling */
.chat-image-container {
    max-height: 400px;
}