/*
 * ARTISAN IMAGE PROCESSOR - COMPONENT STYLES
 * 
 * This file contains all CSS for individual UI components and interactive elements.
 * Each section corresponds to a major feature area of the application.
 * 
 * Component Categories:
 * - Section headings and typography
 * - Upload area and file management
 * - Size selection tabs and grids
 * - Preview area and image display
 * - Form controls (buttons, inputs, selects)
 * - Progress indicators and status displays
 */

/* ===== SECTION HEADINGS & TYPOGRAPHY ===== */
/* Main headings (h2) - styled like interactive cards with borders and shadows */
h2 {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f9ff;
    border: var(--h2-border-width) solid rgba(232, 249, 255, 0.5);
    border-radius: 8px;
    padding: 12px 15px 8px 15px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
    background-color: rgba(250, 251, 255, 0.3);
    transition: all 0.2s ease;
}

/* H2 hover effect - lifts and enhances shadow for interactivity */
h2:hover {
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Subheadings (h3) - matches h2 styling but with different color accent */
h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    margin-top: 25px;
    color: #222;
    border-bottom: 2px solid #d0dde7;
    padding-bottom: 8px;
}

/* ===== UPLOAD AREA COMPONENTS ===== */
/* File upload area - dashed border drag-and-drop zone with hover states */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Upload area hover effect - darker border for visual feedback */
.upload-area:hover {
    border-color: #999;
}

/* Upload area when files are dragged over it - enhanced visual feedback */
.upload-area.drag-over {
    border-color: #333;
    background-color: #f0f0f0;
}

/* File list container - spacing for uploaded file list */
.file-list {
    margin-top: 15px;
    padding: 0;
}

/* Individual file item - shows filename with remove button in flex layout */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 6px;
    transition: background-color 0.2s ease;
}

.file-item:hover {
    background: var(--gray-100);
}

.file-item:last-child {
    margin-bottom: 0;
}

/* File name display */
.file-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ===== TAB NAVIGATION SYSTEM ===== */
/* Tab navigation container - horizontal layout with centered alignment */
.tabs {
    display: flex;
    justify-content: center;  /* Centers the tabs horizontally */
    border-bottom: 1px solid #fafbff;
    margin-bottom: 15px;
    gap: 3px;
}

/* Individual tab styling - looks like folder tabs with hover effects */
.tab {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    border: 1px solid #f2f2f2;
    border-radius: 8px 8px 0 0;
    background-color: #fafbff;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: -1px;
}

/* Tab hover effect - lifts and changes background for interactivity */
.tab:hover {
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    background-color: #fbfbfb;
}

/* Active tab styling - stands out with white background and enhanced shadow */
.tab.active {
    border-bottom: 2px solid #333;
    color: #333;
    background-color: white;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #f2f2f2;
}

/* Tab content containers - hidden by default, shown when active */
.tab-content {
    display: none;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #f2f2f2;
    border-radius: 8px;
    background-color: #fbfbfb;
    margin-bottom: 18px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

/* Show active tab content */
.tab-content.active {
    display: block;
}

/* Tab content hover effect - subtle shadow enhancement */
.tab-content:hover {
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
}

/* ===== SIZE SELECTION COMPONENTS ===== */
/* Size grid layout - responsive grid for size options */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* Changed: Fixed 3 columns */
    gap: 8px;
    margin-bottom: 20px;
}

/* Individual size option layout - checkbox and label with hover effects */
.size-option {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    width: fit-content;  /* Constrains width to content */
    max-width: 100%;     /* Prevents overflow */
}

/* Size option hover effect - yellow highlight with shadow */
.size-option:hover {
    background-color: #FFFBDE;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    border: 1px solid #fafbff;
}

/* Size option label spacing - margin for checkbox */
.size-option label {
    margin-left: 8px;
    cursor: pointer;
}

/* Custom size input container - vertical layout for custom dimensions */
.custom-size-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* Custom size input row - horizontal layout for width/height inputs */
.custom-size-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Selected sizes display area - shows chosen sizes with remove buttons */
.selected-sizes {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px transparent #fbfbfb;
}

/* Individual selected size item - shows size with remove button */
.selected-size-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f8f8;
    border: 1px solid var(fbfbfb);
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-primary);
}

.selected-size-item:last-child {
    margin-bottom: 1;
}

.selected-size-item span {
    font-weight: 500;
}

/* ===== PREVIEW AREA COMPONENTS ===== */
/* Preview area - shows processed image previews in grid layout */
.preview-area {
    border: 2px none #f8f8f8;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* When preview has content */
.preview-area:not(:empty) {
    border-style: solid;
    background: #f8f8f8;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

/* Individual preview item - card for each processed image */
.preview-item {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
}

.preview-item h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 0 10px 0;
    font-size: 14px;
}

/* Preview image - thumbnail of processed image with consistent sizing */
.preview-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background-color: #f8f8f8;
}

/* Preview info text - shows dimensions and details below image */
.preview-info {
    padding: 10px;
    font-size: 14px;
}

/* ===== SUPERSIZED PREVIEW COMPONENTS ===== */
/* Supersized preview for middle panel - large, prominent image display */
.supersized-preview {
    text-align: center;
    padding: 20px;
}

.supersized-preview h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.preview-image-container {
    margin-bottom: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.supersized-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #f9fafb;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.supersized-image:hover {
    transform: scale(1.02);
}

.preview-info {
    display: flex;
    justify-content: space-around;
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.preview-info p {
    margin: 0;
    color: var(--text-secondary);
}

/* ===== FORM CONTROL COMPONENTS ===== */
/* Option group spacing and styling - containers for related controls */
.option-group {
    margin-bottom: 18px;
}

/* Bordered option groups - first 4 groups get special card styling */
.option-group:nth-child(1),
.option-group:nth-child(2),
.option-group:nth-child(3),
.option-group:nth-child(4) {
    padding: 15px;
    border: 1px solid #f2f2f2;
    border-radius: 16px;
    background-color: #fbfbfb;
    margin-bottom: 18px;
    box-shadow: 1px 1px 4px #fafbff;
    transition: all 0.2s ease;
}

/* Hover effect for bordered option groups */
.option-group:nth-child(1):hover,
.option-group:nth-child(2):hover,
.option-group:nth-child(3):hover,    
.option-group:nth-child(4):hover {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Option group labels - consistent styling for form labels */
.option-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 450;
}

/* ===== SLIDER CONTROLS - Uses Global Theme from forms.css ===== */
/* All slider styling is now handled by the global theme in forms.css */

/* ===== DPI PRESET BUTTONS ===== */
/* DPI preset buttons container - horizontal layout with spacing */
.dpi-presets {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* DPI preset individual buttons - small clickable DPI values */
.dpi-preset {
    padding: 5px 10px;
    border: 1px solid #fafbff;
    border-radius: 16px;
    background-color: #fafbff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

 /* DPI preset hover effect */
 .dpi-preset:hover {
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    background-color: #f0f6ff;
}

    /* Active DPI preset - shows which DPI is selected */
    .dpi-preset.active {
        background-color: #333;
        color: white;
        border-color: #333;
        box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
}
    /* Active DPI preset hover effect */
    .dpi-preset.active:hover {
        background-color: #555;
        border-color: #555;
}

/* ===== RADIO BUTTON GROUPS ===== */
/* Radio button group container - horizontal layout for radio options */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
/* Hide actual radio buttons - replaced with styled labels */
.radio-group .radio-option input[type="radio"] {
    display: none;
}

/* Radio button labels styled as round buttons */
.radio-group .radio-option label {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #fafbff;
    border-radius: 16px;
    background-color: #fafbff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    text-align: center;
    min-width: 50px;
}
    
/* Radio button label hover effect */
.radio-group .radio-option label:hover {
    box-shadow: 2px 2px 9px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    background-color: #f0f6ff;
}

/* Checked radio button styling - dark when selected */
.radio-group .radio-option input[type="radio"]:checked + label {
    background-color: #333;
    color: white;
    border-color: #333;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Checked radio button hover effect */
.radio-group .radio-option input[type="radio"]:checked + label:hover {
    background-color: #555;
    border-color: #555;
}

/* Small text for radio button labels */
.radio-option label {
    font-size: 11px;
    font-weight: 600;
    color: #030303;
    margin-left: 6px;
    cursor: pointer;
}

/* ===== COLLAPSIBLE SECTIONS - Uses Global Theme from forms.css ===== */
/* All collapsible styling is now handled by the global theme in forms.css */

/* ===== COLOR PICKER COMPONENTS ===== */
/* Color picker container layout - horizontal layout for picker and label */
.color-picker-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* Color picker input styling - consistent sizing and appearance */
input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 5px;
    border: 1px solid #ccc;
}

input[type="color"]::-moz-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-moz-color-swatch {
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ===== PROGRESS INDICATORS ===== */
/* Button container layout - horizontal button group with spacing */
.buttons-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.buttons-container .button {
    flex-grow: 1; /* Allow buttons to grow */
    max-width: 180px; /* Max width for each button */
}

.buttons-container .secondary-button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.buttons-container .secondary-button:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

/* Processing status container spacing - enhanced spacing for visibility */
#processing-status {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    min-width: 300px;
    justify-content: center;
}

#processing-status.hidden {
    opacity: 0;
    pointer-events: none;
}

#processing-status p {
    margin: 0;
    font-size: 1em;
}

/* Progress bar container styling - background track for progress bar */
.w-full.bg-gray-200.rounded-full {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    width: 150px;
}

/* Progress bar fill - shows completion progress with smooth animation */
#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

/* Progress text */
#progress-text {
    font-size: 0.9em;
    color: var(--text-light);
    margin-left: 10px;
}

/* ===== REMOVE BUTTON COMPONENT ===== */
/* Remove button - red circular button with X for removing items */
.remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.1em;
    margin-left: 10px;
    transition: color 0.2s ease;
}

.remove-btn:hover {
    color: var(--danger-color-dark);
}

/* Remove button styling for selected sizes */
.remove-size-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 8px;
    transition: color 0.2s ease;
    padding: 2px 5px;
    border-radius: 4px;
}

.remove-size-btn:hover {
    background-color: rgba(255, 0, 0, 0.1);
}

/* ===== RESPONSIVE UTILITIES ===== */

/* Text color utilities */
.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

/* Margin utilities */
.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Display utilities */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.gap-6 {
    gap: 1.5rem;
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

/* Width utilities */
.w-full {
    width: 100%;
}

/* Middle panel - contains the large preview */
.middle-panel {
    flex: 2; /* Takes more space */
    background-color: var(--panel-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--panel-shadow);
}

/* Detailed preview area for right panel */
.detailed-preview-area {
    width: 100%;
    height: 400px; /* Fixed height for detailed preview */
    background-color: var(--gray-50);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin-top: 15px;
}

.detailed-preview-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* AI Features Panel - Now Uses Global Section Theme */
.ai-features-panel {
    /* Remove all custom styling - inherits from global .section class in layout.css:
       - background-color: white
       - border-radius: var(--border-radius) [12px]
       - box-shadow: var(--box-shadow-light) [3px 3px 12px rgba(0, 0, 0, 0.08)]
       - padding: var(--section-padding) [25px]
       - border: 1px solid rgba(0, 0, 0, 0.05)
       - margin-bottom: var(--section-margin) [30px]
       - hover effects with transform and enhanced shadow
    */
}

.ai-features-panel h2 {
    /* Remove all custom styling - inherits from global h2 styling in components.css:
       - color: #222
       - border-bottom: 2px solid #e8f9ff
       - background-color: rgba(250, 251, 255, 0.3)
       - box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08)
       - hover effects with transform and enhanced shadow
    */
}

.ai-feature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5); /* Lighter separator */
}

.ai-feature:last-child {
    border-bottom: none;
}

.ai-feature label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
    flex-grow: 1;
    cursor: pointer;
}

.ai-feature .toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
    margin-left: 10px;
}

.ai-feature .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ai-feature .toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.ai-feature .toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.ai-feature .toggle-switch input:checked + .slider {
    background-color: #2196F3;
}

.ai-feature .toggle-switch input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

.ai-feature .toggle-switch input:checked + .slider:before {
    transform: translateX(16px);
}

.ai-feature .tooltip {
    margin-left: 10px;
    color: #888;
    cursor: help;
}

.ai-feature .button {
    margin-left: 10px;
}

.upscale-options .button {
    flex-grow: 0;
    width: auto;
    min-width: 120px;
}

/* Tooltip styles */
.tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the icon */
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

.ai-feature .tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== AI ENHANCEMENT SECTION STYLES ===== */

/* AI Feature Card - Following Artisan Style Guide */
.ai-feature-card {
    background-color: rgba(250, 251, 255, 0.3);
    border: 1px solid rgba(232, 249, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.ai-feature-card:hover {
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Feature Header */
.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feature-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-input:checked + .toggle-label {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(26px);
}

/* Feature Options */
.feature-options {
    animation: slideDown 0.3s ease;
}

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

/* Sub Options */
.sub-options {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid #e0e0e0;
    margin-top: 15px;
}

/* Slider Group */
.slider-group {
    margin-bottom: 15px;
}

.slider-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

/* AI Status Indicators */
.ai-status-available,
.ai-status-unavailable {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-status-available {
    background-color: var(--accent-green);
    color: var(--text-primary);
    border: 1px solid var(--accent-blue);
}

.ai-status-unavailable {
    background-color: #fafbff;
    color: var(--danger-color);
    border: 1px solid var(--accent-blue);
}

/* Test Button */
#test-bg-removal {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    padding: var(--button-padding);
    border-radius: var(--button-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
}

#test-bg-removal:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12);
}

#test-bg-removal:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

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

.notification-success {
    background-color: var(--accent-green);
    color: var(--text-primary);
    border: 1px solid var(--accent-blue);
}

.notification-error {
    background-color: #fafbff;
    color: var(--danger-color);
    border: 1px solid var(--accent-blue);
}

.notification-info {
    background-color: #f0f6ff;
    color: var(--text-primary);
    border: 1px solid var(--accent-blue);
}

/* Advanced Settings Collapsible */
#processing-mode {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
}

/* Checkbox Label Styling */
.option-group label input[type="checkbox"] {
    margin-right: 8px;
}

.option-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.option-group label:hover {
    color: var(--primary-color);
}

/* GPU Processing Option */
#batch-gpu-processing {
    margin-right: 8px;
}

/* Responsive adjustments for AI features */
@media (max-width: 768px) {
    .ai-feature-card {
        padding: 15px;
    }
    
    .feature-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .toggle-switch {
        align-self: flex-end;
    }
    
    .sub-options {
        margin-left: 10px;
        padding-left: 10px;
    }
}

/* RESPONSIVE DESIGN - Adjustments for smaller screens */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column; /* Stack panels vertically */
    }

    .left-panel, .middle-panel, .right-panel {
        width: 100%; /* Full width on small screens */
        margin-bottom: 20px; /* Space between stacked panels */
    }

    .buttons-container {
        flex-direction: column;
        gap: 10px;
    }

    .buttons-container .button {
        max-width: 100%;
    }

    .size-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on small screens */
    }
}

@media (max-width: 480px) {
    .size-grid {
        grid-template-columns: 1fr; /* Single column on extra small screens */
    }
}

/* Ensure the correct variable is used for primary color */
#progress-bar {
    background-color: var(--primary-color);
}

.button.primary-button,
.button.secondary-button:hover {
    background-color: var(--primary-color);
}

/* Collapsible styles are now handled by the global theme in forms.css */