
/* In style.css or a new tool_specific.css */
#custom-alert-container {
    position: fixed;
    top: 1.5rem; /* Increased top margin */
    right: 1.5rem;
    z-index: 10000;
    width: 100%;
    max-width: 26rem; /* sm:max-w-md */
}

/* General Tool Form Enhancements */
.file-input-custom { /* Already in base_tool.html style, can be enhanced here or there */
    border-style: dashed;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.file-input-custom:hover, .file-input-custom.dragover {
    border-color: #3b82f6; /* brand-blue */
    background-color: rgba(59, 130, 246, 0.05); /* Lighter blue tint */
    transform: scale(1.02);
}
.file-input-text.selected,
p[id$="-file-name"].selected {
    color: #60a5fa; /* Lighter blue for selected text */
    font-weight: 500;
}

/* Progress Bar (Global for tools - can be used by JS for overall file upload) */
.global-progress-bar-container {
    width: 100%;
    background-color: rgba(31, 41, 55, 0.5); /* gray-800 with opacity */
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 0.5rem;
    height: 10px; /* Thinner for a sleeker look */
    border: 1px solid rgba(55, 65, 81, 0.5);
    display: none; /* Shown by JS */
}
.global-progress-bar {
    width: 0%;
    background-image: linear-gradient(to right, #3b82f6, #60a5fa);
    height: 100%;
    text-align: center;
    line-height: 10px;
    font-size: 0.75rem; /* text-xs */
    color: white;
    transition: width 0.3s ease-in-out;
    box-shadow: inset 0 -1px 1px rgba(0,0,0,0.15);
}


/* Processed File Item Styling */
.processed-file-item {
    background-color: rgba(55, 65, 81, 0.6); /* Slightly darker, more contrast */
    border: 1px solid rgba(75, 85, 99, 0.8);
    padding: 1rem 1.25rem; /* Increased padding */
    border-radius: 0.75rem; /* rounded-xl */
    display: flex;
    gap: 0.75rem; /* space-x-3 equivalent */
    align-items: center;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; /* For potential absolute elements like status badges */
}
.processed-file-item:hover {
    background-color: rgba(75, 85, 99, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.processed-file-icon {
    flex-shrink: 0;
    color: #9ca3af; /* gray-400 */
}
.processed-file-icon svg {
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
}

.processed-file-info {
    flex-grow: 1;
    min-width: 0;
}
.processed-file-name {
    font-weight: 600; /* semibold */
    color: #e5e7eb; /* gray-200 */
    word-break: break-all;
    font-size: 0.95rem; /* Slightly larger */
}
.processed-file-details {
    font-size: 0.8rem; /* Slightly larger text-xs */
    color: #9ca3af; /* gray-400 */
    margin-top: 0.125rem; /* mt-0.5 */
}
.processed-file-details .truncate {
    display: inline-block;
    vertical-align: bottom;
    max-width: 120px; /* Adjust as needed */
}
.processed-file-expiry {
    font-size: 0.75rem; /* text-xs */
    color: #facc15; /* yellow-400 */
    margin-top: 0.25rem;
}
.processed-file-expiry .countdown-timer {
    font-weight: 500;
}


.processed-file-actions .action-button {
    padding: 0.625rem 0.875rem; /* Slightly larger */
    border-radius: 0.5rem; /* rounded-md */
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s, transform 0.15s ease-out;
    border: 1px solid transparent;
}
.processed-file-actions .action-button:hover {
    transform: translateY(-1px);
}
.processed-file-actions .action-button:active {
    transform: translateY(0px);
}

.download-btn-tool {
    background-color: #3b82f6; /* brand-blue */
    color: white;
}
.download-btn-tool:hover {
    background-color: #2563eb; /* darker blue */
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.delete-btn-tool {
    background-color: transparent;
    color: #f87171; /* red-400 */
    border: 1px solid #ef4444; /* red-500 */
}
.delete-btn-tool:hover {
    background-color: rgba(239, 68, 68, 0.1); /* red-500 with alpha */
    color: #ef4444; /* red-500 */
}
.delete-btn-tool:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #4b5563; /* gray-600 */
    color: #6b7280; /* gray-500 */
}
.delete-btn-tool:disabled:hover {
    background-color: transparent;
}

/* Szhimatel Mode Toggle */
.szh-mode-btn {
    background-color: transparent;
    color: #9ca3af; /* gray-400 */
    border: 1px solid #374151; /* gray-700 */
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.szh-mode-btn.active {
    background-color: #3b82f6; /* brand-blue */
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.3); /* Ring effect */
}
.szh-mode-btn:not(.active):hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    color: #d1d5db; /* gray-300 */
}

/* Konvertus Queue Item Styling */
.konvertus-queue-item {
    background-color: rgba(55, 65, 81, 0.3); /* Slightly transparent gray-700 */
    border: 1px solid rgba(75, 85, 99, 0.5); /* gray-600 */
    padding: 1rem;
    border-radius: 0.75rem; /* rounded-xl */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* space-y-3 */
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
@media (min-width: 768px) { /* md breakpoint */
    .konvertus-queue-item {
        flex-direction: row;
        align-items: center;
        gap: 1rem; /* space-x-4 */
    }
}
.konvertus-queue-item:hover {
    background-color: rgba(75, 85, 99, 0.4);
    border-color: rgba(96, 108, 123, 0.7);
}
.konvertus-item-icon {
    flex-shrink: 0;
    color: #9ca3af;
    display: none; /* Hidden on mobile by default */
}
@media (min-width: 768px) {
    .konvertus-item-icon { display: block; }
}
.konvertus-item-icon svg {
    width: 1.75rem; /* w-7 */
    height: 1.75rem; /* h-7 */
}
.konvertus-item-info {
    flex-grow: 1;
    min-width: 0;
}
.konvertus-item-name {
    font-weight: 500;
    color: #e5e7eb;
    font-size: 0.875rem; /* text-sm */
    word-break: break-all;
}
.konvertus-item-size {
    font-size: 0.75rem; /* text-xs */
    color: #9ca3af;
}

.konvertus-item-controls {
    display: flex;
    flex-direction: column; /* Stack controls on mobile */
    gap: 0.5rem;
    align-items: stretch; /* Make inputs full width on mobile stack */
}
@media (min-width: 768px) { /* md breakpoint */
    .konvertus-item-controls {
        flex-direction: row; /* Row on larger screens */
        flex-shrink: 0; /* Prevent controls from shrinking too much */
        align-items: center; /* Align items nicely in a row */
        gap: 0.75rem;
    }
}

.konvertus-queue-item .target-format-select,
.konvertus-queue-item .image-quality-input {
    font-size: 0.8rem; /* slightly larger */
    padding: 0.5rem 0.75rem !important;
    background-color: rgba(31, 41, 55, 0.8); /* gray-800 more opaque */
    border: 1px solid #4b5563; /* gray-600 */
    border-radius: 0.375rem; /* rounded-md */
    color: #e5e7eb;
    min-width: 100px; /* Ensure select is not too small */
}
.konvertus-queue-item .image-quality-input {
    width: 80px; /* Fixed width for quality input */
}
.konvertus-queue-item .target-format-select:focus,
.konvertus-queue-item .image-quality-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.konvertus-item-actions {
    display: flex; /* For status and remove button */
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem; /* Spacing on mobile when stacked */
}
@media (min-width: 768px) {
    .konvertus-item-actions {
        margin-top: 0; /* Reset margin for row layout */
    }
}
.konvertus-item-status {
    font-size: 0.75rem; /* text-xs */
    color: #9ca3af;
    min-height: 1rem;
    flex-grow: 1; /* Allow status to take space */
    text-align: left;
}
@media (min-width: 768px) {
    .konvertus-item-status {
        min-width: 100px; /* Give status some space */
        text-align: right; /* Align status to right for row layout */
    }
}
.konvertus-item-status.status-processing { color: #facc15; } /* yellow-400 */
.konvertus-item-status.status-error { color: #f87171; } /* red-400 */
.konvertus-item-status.status-success { color: #4ade80; } /* green-400 */

.remove-konvertus-item {
    background-color: transparent;
    color: #9ca3af;
    padding: 0.375rem; /* p-1.5 */
    border-radius: 9999px; /* rounded-full */
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.remove-konvertus-item:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.remove-konvertus-item svg {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
}


/* Animation classes */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in-up { animation: fadeInUp 0.3s ease-out forwards; }

@keyframes fadeOutDown { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } }
.animate-fade-out-down { animation: fadeOutDown 0.3s ease-out forwards; }


/* Responsive Design for Buttons on Small Screens */
@media (min-width: 640px) { /* sm breakpoint from Tailwind */
    .processed-file-actions .action-button .icon-only-mobile {
        margin-right: 0.25rem; /* Add space if text is visible */
    }
    .processed-file-actions .action-button .button-text-desktop {
        display: inline; /* Visible on sm and up */
    }
}
.processed-file-actions .action-button .icon-only-mobile {
    /* Icon is always visible */
}
.processed-file-actions .action-button .button-text-desktop {
    display: none; /* Hidden by default */
}
#konvertus-staging-area {
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}
#konvertus-staging-heading {
    color: #e5e7eb; /* gray-200 */
}
#start-konvertus-batch-button:disabled {
    background-color: #374151;
    cursor: not-allowed;
    opacity: 0.6;
}
#start-konvertus-batch-button:disabled:hover {
    background-color: #374151;
    transform: none;
}

/* Kropper Specific: Ensure manual inputs are consistent */
.manual-input-grid .form-input-tool {
    padding: 0.625rem 0.875rem; /* Slightly smaller for dense UI */
    font-size: 0.875rem;
}
#cropper-controls .form-label {
    font-size: 0.875rem; /* text-sm */
    color: #d1d5db; /* gray-300 */
}
#cropper-controls .preset-button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Tool page aside refinement */
.aside-card {
    background-color: rgba(31, 41, 55, 0.6); /* Slightly more transparent */
    backdrop-filter: blur(12px); /* Stronger blur */
    border: 1px solid rgba(55, 65, 81, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); /* Softer, larger shadow */
}
.aside-card h3 {
    border-bottom: 1px solid rgba(75, 85, 99, 0.4);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem; /* Consistent spacing after heading */
}

/* Estimated output size for Szhimatel */
#estimated-output-container {
    background-color: rgba(31, 41, 55, 0.4);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(55, 65, 81, 0.5);
    font-size: 0.8rem;
}

/* Ensure tool specific progress bar is consistent */
.tool-upload-form .progress-bar-container {
    height: 12px;
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(55, 65, 81, 0.7);
}
.tool-upload-form .progress-bar {
    height: 100%;
    font-size: 0.7rem;
    line-height: 12px;
}

#konvertus-batch-status {
    margin-top: 0.25rem;
    height: 1.25rem; /* Ensure space for messages */
}
#konvertus-app .progress-bar-container { /* Specific to Konvertus batch progress */
    height: 8px; /* Slimmer for batch overall progress */
}
#konvertus-app .progress-bar {
    height: 100%;
}
#konvertus-app .submit-button-tool {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
