/**
 * BUTTON ENHANCEMENTS - EXACT MATCH TO ORIGINAL ARTISAN.HTML
 * 
 * This file restores the exact styling from the original Artisan.html file
 * NO deviations from the original design are allowed.
 */

/* ===== UNIVERSAL BUTTON BASE - EXACT ORIGINAL STYLING ===== */
.button {
    padding: 8px 20px !important;
    border: 1px solid rgba(232, 249, 255, 0.5) !important;
    border-radius: 20px !important; /* CRITICAL: 20px radius makes them pill-shaped */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08) !important;
    background-color: rgba(250, 251, 255, 0.3) !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Enhanced button hover effect - matches original */
.button:hover:not(:disabled) {
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px) !important;
}

/* ===== PRIMARY BUTTONS - DARK THEME ===== */
.primary-button {
    background-color: #333 !important;
    color: white !important;
    border-color: #333 !important;
}

.primary-button:hover:not(:disabled) {
    background-color: #555 !important;
    border-color: #555 !important;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px) !important;
}

/* ===== SECONDARY BUTTONS - LIGHT THEME ===== */
.secondary-button {
    background-color: #eee !important;
    color: #333 !important;
    border-color: rgba(232, 249, 255, 0.7) !important;
}

.secondary-button:hover:not(:disabled) {
    background-color: #ddd !important;
    border-color: rgba(232, 249, 255, 0.9) !important;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px) !important;
}

/* ===== SPECIFIC BUTTON TARGETING ===== */
/* Select All & Clear All buttons - should match Process button styling */
#select-all,
#clear-sizes {
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    min-width: 100px !important; /* Ensure consistent sizing */
}

/* Add Custom Size button - primary styling */
#add-custom-size {
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background-color: #333 !important;
    color: white !important;
    border-color: #333 !important;
}

#add-custom-size:hover:not(:disabled) {
    background-color: #555 !important;
    border-color: #555 !important;
}

/* Process & Download buttons - ensure they maintain original styling */
#process-button,
#download-single,
#download-all,
#reset-all {
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    min-width: 140px !important; /* Consistent width for main action buttons */
}

#process-button {
    background-color: #333 !important;
    color: white !important;
    border-color: #333 !important;
}

#process-button:hover:not(:disabled) {
    background-color: #555 !important;
    border-color: #555 !important;
}

#process-button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Download Single button - Arctic Ice Blue when enabled */
#download-single:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.2s ease !important;
}

#download-single:not(:disabled):hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
}

#download-single:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Download All button - Green when enabled */
#download-all:not(:disabled) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.2s ease !important;
}

#download-all:not(:disabled):hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Download button pulse animation when ready */
#download-all:not(:disabled) {
    animation: downloadReady 2s ease-in-out infinite;
}

@keyframes downloadReady {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(5, 150, 105, 0.5);
    }
}

/* Individual download buttons - same green styling as main download */
.download-single {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: white !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
    transition: all 0.2s ease !important;
}

.download-single:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Reset button positioning - slightly lower and to the right */
#reset-all {
    margin-left: auto !important;
    align-self: flex-end !important;
    margin-top: 4px !important; /* Slight vertical offset for visual appeal */
}

/* ===== DPI PRESET BUTTONS - EXACT ORIGINAL STYLING (FIXED) ===== */
.dpi-preset {
    padding: 5px 10px !important;
    border: 1px solid #fafbff !important; /* Fixed: was ##fafbff in original (typo) */
    border-radius: 16px !important;
    background-color: #fafbff !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    color: #333 !important;
}

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

.dpi-preset.active {
    background-color: #333 !important;
    color: white !important;
    border-color: #333 !important;
    box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.dpi-preset.active:hover {
    background-color: #555 !important;
    border-color: #555 !important;
}

/* ===== FORMAT BUTTONS - STYLED AS RADIO BUTTONS LIKE ORIGINAL (FIXED) ===== */
.format-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.format-btn {
    display: inline-block;
    padding: 5px 10px !important;
    border: 1px solid #fafbff !important; /* Fixed: was ##fafbff in original (typo) */
    border-radius: 16px !important;
    background-color: #fafbff !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    min-width: 50px !important;
    color: #333 !important;
}

.format-btn:hover {
    box-shadow: 2px 2px 9px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
    background-color: #f0f6ff !important;
}

.format-btn.active {
    background-color: #333 !important;
    color: white !important;
    border-color: #333 !important;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.format-btn.active:hover {
    background-color: #555 !important;
    border-color: #555 !important;
}

/* ===== BUTTON CONTAINERS - ENSURE PROPER SPACING ===== */
.buttons-container {
    display: flex;
    align-items: flex-start; /* Allow different heights */
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
    min-height: 40px; /* Ensure consistent container height */
}

.buttons-container .button {
    flex: 0 0 auto; /* Don't grow/shrink, use natural size */
}

/* Utility class to push reset button to the right */
.ml-auto {
    margin-left: auto;
}

/* ===== PROGRESS BAR - ORIGINAL DARK STYLING ===== */
#progress-bar {
    background-color: #333 !important;
    height: 4px !important;
    border-radius: 3px !important;
    transition: width 0.3s ease !important;
    margin: 1px !important;
    color: white !important;
}

.w-full.bg-gray-200.rounded-full {
    background-color: #ddd !important;
    height: 8px !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
}

#processing-status {
    border-color: #ddd !important;
    background: white !important;
} 