/* Content Factory Custom Styles */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* Loading animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-height: 2.75rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary.w-full {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    min-height: 2.75rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
    color: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary.w-full {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* Button spacing when displayed together */
.btn-primary + .btn-secondary,
.btn-secondary + .btn-primary {
    margin-left: 0.75rem;
}

/* Button group styling */
.space-x-3 > .btn-primary,
.space-x-3 > .btn-secondary {
    margin-right: 0.75rem;
}

.space-x-3 > .btn-primary:last-child,
.space-x-3 > .btn-secondary:last-child {
    margin-right: 0;
}

.btn-danger {
    @apply bg-red-500 text-white px-4 py-2 rounded-md font-medium hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition-colors inline-block;
    display: inline-block;
    text-decoration: none;
}

.btn-danger.w-full {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.btn-sm {
    @apply px-3 py-1.5 text-sm;
}

.btn-lg {
    @apply px-6 py-3 text-lg;
}

/* Form styles */
.form-input {
    @apply block w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 sm:text-sm transition-colors duration-200;
}

.form-textarea {
    @apply block w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 sm:text-sm resize-vertical transition-colors duration-200;
    width: 100%;
}

.form-select {
    @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-brand-500 focus:border-brand-500 sm:text-sm;
}

.form-checkbox {
    @apply h-4 w-4 text-brand-600 focus:ring-brand-500 border-gray-300 rounded;
}

.form-radio {
    @apply h-4 w-4 text-brand-600 focus:ring-brand-500 border-gray-300;
}

/* Card styles */
.card {
    @apply bg-white overflow-hidden shadow-lg rounded-xl border border-gray-100;
}

.card-header {
    @apply px-6 py-5 sm:px-8 border-b border-gray-200 bg-gray-50;
}

.card-body {
    @apply px-6 py-6 sm:p-8;
}

.card-footer {
    @apply px-4 py-4 sm:px-6 border-t border-gray-200 bg-gray-50;
}

/* Status badges - moved to consolidated section below */

.status-new {
    @apply bg-gray-100 text-gray-800 border border-gray-200;
}

.status-transcript-ready,
.status-content-ready {
    @apply bg-blue-100 text-blue-800 border border-blue-200;
}

.status-generated {
    @apply bg-amber-100 text-amber-800 border border-amber-200;
}

.status-queued-publish {
    @apply bg-purple-100 text-purple-800 border border-purple-200;
}

.status-published {
    @apply bg-green-100 text-green-800 border border-green-200;
}

.status-scraping {
    @apply bg-orange-100 text-orange-800 border border-orange-200;
}

.status-generating {
    @apply bg-yellow-100 text-yellow-800 border border-yellow-200;
}

.status-failed {
    @apply bg-red-100 text-red-800 border border-red-200;
}

/* Table styles */
.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table th {
    @apply px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table tbody tr:nth-child(even) {
    @apply bg-gray-50;
}

.table tbody tr:hover {
    @apply bg-gray-100;
}

/* Modal styles */
.modal {
    @apply fixed inset-0 z-50 overflow-y-auto;
}

.modal-backdrop {
    @apply fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity;
}

.modal-content {
    @apply inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full;
}

/* Toast styles */
.toast {
    @apply max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden;
}

/* Loading spinner */
.spinner {
    @apply animate-spin rounded-full border-2 border-gray-300 border-t-brand-500;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .card-body {
        @apply px-4 py-4;
    }
    
    .card-header {
        @apply px-4 py-4;
    }
    
    .btn-primary,
    .btn-secondary {
        @apply text-sm px-3 py-2;
        min-height: 2.5rem;
    }
    
    .status-badge {
        @apply px-2.5 py-1 text-xs;
        font-size: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .card-body {
        @apply px-5 py-5;
    }
    
    .card-header {
        @apply px-5 py-4;
    }
}

@media (min-width: 1024px) {
    .card-body {
        @apply px-8 py-8;
    }
    
    .card-header {
        @apply px-8 py-6;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Typography improvements */
.text-heading {
    @apply text-gray-900 font-bold leading-tight;
}

.text-subheading {
    @apply text-gray-700 font-semibold leading-snug;
}

.text-body {
    @apply text-gray-600 leading-relaxed;
}

.text-caption {
    @apply text-gray-500 text-sm leading-normal;
}

.text-muted {
    @apply text-gray-400 text-sm;
}

/* Improved line heights for better readability */
h1, .h1 {
    @apply text-3xl font-bold leading-tight;
}

h2, .h2 {
    @apply text-2xl font-bold leading-tight;
}

h3, .h3 {
    @apply text-xl font-semibold leading-snug;
}

h4, .h4 {
    @apply text-lg font-semibold leading-snug;
}

h5, .h5 {
    @apply text-base font-semibold leading-normal;
}

h6, .h6 {
    @apply text-sm font-semibold leading-normal;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.focus-visible {
    @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
}

/* Logo link - no underline */
.logo-link {
    text-decoration: none !important;
}

.logo-link:hover {
    text-decoration: none !important;
}

.logo-link:focus {
    text-decoration: none !important;
}

.logo-link:visited {
    text-decoration: none !important;
}

/* Modern design improvements */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.shadow-large {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom scrollbar for specific elements */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading Overlay Styles */
#loading-overlay {
    z-index: 9999;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: none;
}

#loading-overlay:not(.hidden) {
    display: block !important;
}

#loading-overlay .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#progress-bar {
    transition: width 0.3s ease-out;
}

/* Ensure loading overlay is above everything */
#loading-overlay.fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Loading Overlay Styles */
#loading-overlay {
    z-index: 9999;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: none;
}

#loading-overlay:not(.hidden) {
    display: block !important;
}

#loading-overlay .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#progress-bar {
    transition: width 0.3s ease-out;
}

/* Ensure loading overlay is above everything */
#loading-overlay.fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Loading Overlay Styles */
#loading-overlay {
    z-index: 9999;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: none;
}

#loading-overlay:not(.hidden) {
    display: block !important;
}

#loading-overlay .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#progress-bar {
    transition: width 0.3s ease-out;
}

/* Ensure loading overlay is above everything */
#loading-overlay.fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Small button styles for table actions */
.btn-primary.text-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-height: 1.5rem;
    border-radius: 0.25rem;
}

.btn-secondary.text-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-height: 1.5rem;
    border-radius: 0.25rem;
}

/* Task table improvements */
.task-table-container {
    overflow-x: auto;
    overflow-y: visible;
}

.task-table-container .overflow-x-auto {
    overflow-x: auto;
    overflow-y: visible;
}

.card-body {
    overflow: visible !important;
}

.card {
    overflow: visible !important;
}

.task-row {
    transition: all 0.2s ease-in-out;
    position: relative;
}

.task-row td {
    overflow: visible !important;
}

table {
    overflow: visible !important;
    table-layout: fixed;
    width: 100%;
    min-width: 800px;
}

/* Column width constraints */
.task-table th:nth-child(1),
.task-table td:nth-child(1) {
    width: 55%;
    min-width: 350px;
}

.task-table th:nth-child(2),
.task-table td:nth-child(2) {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.task-table th:nth-child(3),
.task-table td:nth-child(3) {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.task-table th:nth-child(4),
.task-table td:nth-child(4) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-table th:nth-child(5),
.task-table td:nth-child(5) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure dropdowns appear above table content */
tbody tr {
    position: relative;
    z-index: 1;
}

tbody tr:hover {
    z-index: 2;
}

/* Dropdown container z-index management */
.dropdown-container {
    position: relative;
    z-index: 1;
}

.dropdown-container:hover {
    z-index: 1000;
}

.dropdown-menu {
    z-index: 10000 !important;
    position: absolute !important;
}

/* When dropdown is open, elevate its container */
.dropdown-container.dropdown-open {
    z-index: 1000 !important;
}

.task-row:hover {
    background-color: #f9fafb;
}

/* Dropdown menu improvements */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    z-index: 99999 !important;
    min-width: 12rem;
    max-width: 16rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white !important;
    margin-top: 0.25rem;
    overflow: visible !important;
    pointer-events: auto !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    transform: translateX(2px);
}

.dropdown-item svg {
    margin-right: 0.75rem;
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

/* Task type badges */
.task-type-youtube {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.task-type-blog {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Status badge improvements - consolidated */
.status-badge {
    @apply inline-flex items-center text-sm font-semibold;
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    font-style: .9rem;
    border: 1px solid transparent;
}

.status-new {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.status-transcript-ready,
.status-content-ready {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.status-generated {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.status-queued-publish {
    background-color: #e9d5ff;
    color: #7c3aed;
    border-color: #c4b5fd;
}

.status-published {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.status-failed {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Action dropdown container */
.dropdown-container {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.dropdown-container:hover {
    z-index: 99999;
}

/* Action dropdown button */
.action-dropdown-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #d1d5db;
    transition: all 0.2s ease-in-out;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-width: 80px;
}

.action-dropdown-btn:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.action-dropdown-btn:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-opacity: 0.5;
}

/* Task title link improvements */
.task-title-link {
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-weight: 600;
    line-height: 1.4;
}

.task-title-link:hover {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

/* Source URL link improvements */
.source-url-link {
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    opacity: 0.7;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.source-url-link:hover {
    opacity: 1;
    color: #1f2937;
    text-decoration: underline;
    text-underline-offset: 1px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

/* Social Media Caption Styles */
.social-caption-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.social-caption-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.social-caption-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.75rem;
}

.social-caption-textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
    resize: vertical;
    min-height: 6rem;
    transition: all 0.2s ease-in-out;
}

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

.social-caption-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

.social-caption-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-caption-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.social-caption-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.social-caption-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.social-caption-btn svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Telegram specific styling */
.telegram-caption {
    border-left: 4px solid #0088cc;
}

.telegram-caption .social-caption-textarea {
    border-color: #bfdbfe;
}

.telegram-caption .social-caption-textarea:focus {
    border-color: #0088cc;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

/* Instagram specific styling */
.instagram-caption {
    border-left: 4px solid #e4405f;
}

.instagram-caption .social-caption-textarea {
    border-color: #fecaca;
}

.instagram-caption .social-caption-textarea:focus {
    border-color: #e4405f;
    box-shadow: 0 0 0 3px rgba(228, 64, 95, 0.1);
}

/* Character count indicators */
.character-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.character-count.warning {
    color: #f59e0b;
}

.character-count.danger {
    color: #ef4444;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .task-row {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .task-row td {
        display: block;
        padding: 0.25rem 0;
        border: none;
    }
    
    .task-row td:first-child {
        margin-bottom: 0.75rem;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        border-radius: 0.375rem;
        margin-top: 0.5rem;
        width: 100% !important;
        max-width: none !important;
        min-width: auto !important;
    }
    
    .dropdown-container {
        width: 100%;
    }
    
    .task-table {
        min-width: 600px;
    }
    
    .task-table th:nth-child(1),
    .task-table td:nth-child(1) {
        min-width: 200px;
    }
    
    .social-caption-actions {
        flex-direction: column;
    }
    
    .social-caption-btn {
        justify-content: center;
        width: 100%;
    }
}

/* Hero Image Responsive Styles */
.hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.hero-image-container {
    width: 100%;
    overflow: hidden;
    border-radius: 0.375rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

/* Responsive hero image heights */
.hero-image-small {
    max-height: 16rem; /* 256px */
}

.hero-image-medium {
    max-height: 20rem; /* 320px */
}

.hero-image-large {
    max-height: 24rem; /* 384px */
}

/* Mobile-first responsive breakpoints */
@media (max-width: 640px) {
    .hero-image-small {
        max-height: 12rem; /* 192px */
    }
    
    .hero-image-medium {
        max-height: 16rem; /* 256px */
    }
    
    .hero-image-large {
        max-height: 20rem; /* 320px */
    }
    
    .hero-image-container {
        padding: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-image-small {
        max-height: 14rem; /* 224px */
    }
    
    .hero-image-medium {
        max-height: 18rem; /* 288px */
    }
    
    .hero-image-large {
        max-height: 22rem; /* 352px */
    }
}

@media (min-width: 769px) {
    .hero-image-small {
        max-height: 16rem; /* 256px */
    }
    
    .hero-image-medium {
        max-height: 20rem; /* 320px */
    }
    
    .hero-image-large {
        max-height: 24rem; /* 384px */
    }
}

/* Ensure images maintain aspect ratio */
.hero-image-aspect-ratio {
    aspect-ratio: 16/9;
    object-fit: cover;
}

.hero-image-aspect-square {
    aspect-ratio: 1/1;
    object-fit: cover;
}

.hero-image-aspect-4-3 {
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Loading state for hero images */
.hero-image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Progress bar animations */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

.progress-step {
    transition: all 0.3s ease-in-out;
}

.progress-step.active {
    transform: scale(1.05);
}

.progress-step.completed {
    transform: scale(1.02);
}

/* Button loading states */
.btn-loading {
    transition: all 0.2s ease-in-out;
}

.btn-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pulse animation for progress indicators */
.pulse-dot {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Simple progress bar animation */
@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-bar-animated {
    animation: progressFill 12s ease-in-out forwards;
}

/* Generating status auto-refresh indicator */
.generating-refresh {
    animation: pulse 2s infinite;
}
