/**
 * Image Shawon - Custom Styles
 * 
 * @package ImageShawon
 */

/* =============================================================================
   CSS VARIABLES
   ============================================================================= */

:root {
    /* Primary Colors - Purple/Violet */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;

    /* Secondary - Teal/Cyan */
    --secondary: #06b6d4;
    --secondary-light: #22d3ee;
    --secondary-dark: #0891b2;

    /* Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* =============================================================================
   TOOL PAGE STYLES
   ============================================================================= */

.tool-page {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.tool-page .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tool-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.tool-page-description {
    color: var(--gray-500);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto;
}

/* =============================================================================
   UPLOAD ZONE
   ============================================================================= */

.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-2xl);
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-100) 0%, white 100%);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-100);
    transform: scale(1.02);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.upload-subtitle {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.upload-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.2s;
}

.upload-button:hover {
    background: var(--primary-dark);
}

.upload-formats {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* =============================================================================
   PROCESS AREA
   ============================================================================= */

.process-area {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
}

.process-options {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 1.5rem;
}

.process-option {
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.process-option:hover {
    border-color: var(--primary-light);
    background: var(--primary-50);
}

.process-option.selected {
    border-color: var(--primary);
    background: var(--primary-50);
}

.process-option-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.process-option-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.process-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

/* =============================================================================
   PROGRESS
   ============================================================================= */

.progress-container {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* =============================================================================
   DOWNLOAD AREA
   ============================================================================= */

.download-area {
    background: linear-gradient(135deg, var(--success-light) 0%, white 100%);
    border-radius: var(--radius-2xl);
    padding: 3rem 2rem;
    text-align: center;
    border: 2px solid var(--success);
}

.download-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    color: var(--success);
}

.download-icon svg {
    width: 100%;
    height: 100%;
}

.download-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.download-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    box-shadow: 0 4px 14px 0 rgba(124, 58, 237, 0.39);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(124, 58, 237, 0.5);
}

/* =============================================================================
   ALERTS
   ============================================================================= */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-error {
    background: var(--error-light);
    color: #991b1b;
}

/* =============================================================================
   IMAGE PREVIEW
   ============================================================================= */

.image-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 1rem auto;
    display: block;
}

.image-preview-container {
    position: relative;
    display: inline-block;
    margin: 1rem 0;
}

.image-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.image-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.hidden {
    display: none !important;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-name {
    font-weight: 600;
    color: var(--gray-800);
}

.file-size {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* =============================================================================
   RANGE SLIDER
   ============================================================================= */

.range-slider {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.4);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* =============================================================================
   INPUT FIELDS
   ============================================================================= */

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* =============================================================================
   SELECT DROPDOWN
   ============================================================================= */

.select-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-field:focus {
    outline: none;
    border-color: var(--primary);
}