/* Custom styles for Prelovium */

/* Text truncation utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Status dropdown styling */
.status-dropdown {
    min-width: 110px; /* Ensure enough width for "In Review" */
    padding-right: 2rem; /* Space for dropdown arrow */
}

/* Upload container hover effects */
.upload-container .border-dashed:hover {
    border-color: #3B82F6;
    background-color: #F8FAFC;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.upload-container {
    transition: all 0.3s ease;
}

/* Enhanced preview image container */
.preview-container {
    transition: all 0.3s ease;
}

.preview-container img {
    max-height: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.preview-container img:hover {
    transform: scale(1.02);
}

/* Button animations */
button {
    transition: all 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

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

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

/* Pulse animation for success icons */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

/* Bounce animation for notifications */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Success message enhancements */
#successMessage {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

#successMessage:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Processing queue styling */
#processingQueue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 1px solid #93c5fd;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Session counter enhancements */
#sessionCounter {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.3s ease-out;
}

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

#sessionCounter:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Example button enhancements */
.example-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.example-btn:disabled {
    transform: none !important;
}

/* Form validation feedback */
.file-input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.file-input-success {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

/* Error message styling */
#errorMessage {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Continuous upload mode badge */
.text-green-700 {
    color: #15803d;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.border-green-200 {
    border-color: #bbf7d0;
}

/* Enhanced form styling */
form {
    transition: all 0.3s ease;
}

.form-uploading {
    opacity: 0.8;
    pointer-events: none;
}

/* Upload progress indicator */
.upload-progress {
    position: relative;
    overflow: hidden;
}

.upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Prose styles for the online ad */
.prose {
    max-width: 65ch;
    color: #374151;
}

.prose h1 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 0.75em;
    font-weight: 600;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose ul {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
    list-style-type: disc;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .preview-container img {
        max-height: 150px;
    }
    
    /* Inventory card adjustments for mobile */
    .inventory-card {
        font-size: 0.875rem; /* 14px */
    }
    
    .inventory-card .text-lg {
        font-size: 1rem; /* 16px instead of 18px */
        line-height: 1.25; /* Better line height for mobile */
    }
    
    .inventory-card .text-sm {
        font-size: 0.75rem; /* 12px instead of 14px */
    }
    
    /* Status dropdown adjustments for mobile */
    .inventory-card .status-dropdown {
        font-size: 0.75rem; /* 12px */
        padding: 0.25rem 2rem 0.25rem 0.5rem; /* More right padding for arrow */
        min-width: 100px; /* Ensure minimum width */
    }
    
    /* Adjust image grid for mobile */
    .inventory-card .grid.grid-cols-3.gap-1.p-2 {
        padding: 0.375rem; /* Reduce padding around images */
        gap: 0.125rem; /* Reduce gap between images */
    }
    
    /* Fix title truncation and spacing */
    .inventory-card h3 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        min-height: 1.25rem; /* Ensure consistent height */
    }
    
    /* Fix description spacing and clamping */
    .inventory-card .line-clamp-2 {
        margin-bottom: 0.75rem; /* Add space before View Details button */
        line-height: 1.3; /* Tighter line height for mobile */
    }
    
    /* Ensure View Details button has proper spacing */
    .inventory-card .view-details-btn {
        margin-top: 0.75rem; /* Consistent spacing */
    }
    
    /* Adjust padding within card content for mobile */
    .inventory-card .p-4 {
        padding: 0.75rem; /* Reduce padding from 1rem to 0.75rem */
    }
    
    /* Adjust spacing between elements in card */
    .inventory-card .mb-2 {
        margin-bottom: 0.375rem; /* Reduce bottom margin */
    }
    
    .inventory-card .mb-3 {
        margin-bottom: 0.5rem; /* Reduce bottom margin */
    }
    
    /* Status dropdown container spacing */
    .inventory-card .status-dropdown + div {
        margin-top: 0.5rem; /* Space above dropdown */
    }

    /* Mobile adjustments for continuous upload features */
    #sessionCounter {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    #processingQueue {
        margin: 0 10px 20px 10px;
        padding: 12px;
    }
    
    .example-btn {
        padding: 12px;
        font-size: 0.875rem;
    }
    
    .example-btn img {
        width: 40px;
        height: 40px;
    }
    
    /* Success message mobile adjustments */
    #successMessage {
        margin: 20px 10px;
        padding: 20px;
    }
    
    #successMessage .text-xl {
        font-size: 1.125rem;
    }
    
    /* Error message mobile adjustments */
    #errorMessage {
        margin: 20px 10px;
        padding: 16px;
    }
} 

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-dashed {
        border-width: 2px;
    }
    
    .text-gray-600 {
        color: #000;
    }
    
    .bg-green-50 {
        background-color: #fff;
        border: 2px solid #000;
    }
} 