/**
 * AI Image Tools Styles
 * Advanced image processing interface with modern design
 */

/* ===== IMAGE TOOLS CONTAINER ===== */
.ai-image-tools {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9996;
    font-family: 'Inter', sans-serif;
}

/* ===== IMAGE TOOLS TOGGLE BUTTON ===== */
.image-tools-toggle {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-tools-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 16px 48px rgba(139, 92, 246, 0.5);
}

.image-tools-toggle:active {
    transform: translateY(-1px) scale(0.98);
}

.tools-icon {
    position: relative;
    color: white;
    font-size: 26px;
    transition: transform 0.3s ease;
}

.image-tools-toggle:hover .tools-icon {
    transform: scale(1.1) rotate(-5deg);
}

.tools-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid white;
}

.tools-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    animation: toolsGlow 3s infinite;
    pointer-events: none;
}

@keyframes toolsGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* ===== IMAGE TOOLS PANEL ===== */
.image-tools-panel {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 480px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
    transform: translateY(30px) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(139, 92, 246, 0.1);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.ai-image-tools.tools-open .image-tools-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.ai-image-tools.tools-open .image-tools-toggle {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ===== TOOLS HEADER ===== */
.tools-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.tools-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tools-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

.tools-info h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.tools-status {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tools-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.tools-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== TOOLS TABS ===== */
.tools-tabs {
    display: flex;
    background: var(--warm-beige);
    border-bottom: 1px solid #e5e7eb;
}

.tools-tab {
    flex: 1;
    padding: 14px 12px;
    border: none;
    background: transparent;
    color: var(--forest-green);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-align: center;
}

.tools-tab.active {
    background: white;
    border-bottom-color: #8b5cf6;
    color: #8b5cf6;
    font-weight: 600;
}

.tools-tab:hover:not(.active) {
    background: rgba(139, 92, 246, 0.1);
}

/* ===== TAB CONTENT ===== */
.tools-tab-content {
    display: none;
    padding: 24px;
    overflow-y: auto;
    max-height: 70vh;
    animation: fadeInTools 0.3s ease-in-out;
}

.tools-tab-content.active {
    display: block;
}

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

/* ===== UPLOAD ZONES ===== */
.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f9fafb;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 48px;
    color: #8b5cf6;
    margin-bottom: 16px;
}

.upload-zone h5 {
    margin: 0 0 8px 0;
    color: var(--forest-green);
    font-size: 18px;
    font-weight: 600;
}

.upload-zone p {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 14px;
}

.upload-formats {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.upload-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ===== SETTINGS SECTIONS ===== */
.optimization-settings,
.background-options,
.style-settings,
.edge-refinement,
.mockup-customization {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.optimization-settings h6,
.background-options h6,
.style-settings h6,
.edge-refinement h6,
.mockup-customization h6 {
    margin: 0 0 16px 0;
    color: var(--forest-green);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-group {
    margin-bottom: 16px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
}

.setting-group select,
.setting-group input[type="number"],
.setting-group input[type="color"],
.setting-group input[type="file"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

/* ===== AI ENHANCEMENT OPTIONS ===== */
.ai-enhancement,
.style-options {
    margin-top: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ===== BACKGROUND PRESETS ===== */
.background-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.bg-preset {
    background: none;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.bg-preset.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.bg-preset:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.preset-preview {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin: 0 auto 8px;
    border: 1px solid #e5e7eb;
}

.transparent-bg {
    background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
                linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.bg-preset span {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.custom-background {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* ===== STYLE GALLERY ===== */
.style-gallery {
    margin-bottom: 20px;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.style-option {
    background: none;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.style-option.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.style-option:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.style-preview {
    width: 100%;
    height: 60px;
    border-radius: 6px;
    margin-bottom: 8px;
    background-size: cover;
    background-position: center;
}

.abstract-style {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
}

.impressionist-style {
    background: linear-gradient(120deg, #f093fb 0%, #f5576c 100%);
    filter: blur(1px);
}

.modern-style {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.minimalist-style {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
}

.vintage-style {
    background: linear-gradient(45deg, #8b5a2b, #d2b48c);
    filter: sepia(0.5);
}

.corporate-style {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.style-option span {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* ===== INTENSITY CONTROLS ===== */
.intensity-controls,
.refinement-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== MOCKUP GENERATOR ===== */
.mockup-generator {
    margin-bottom: 24px;
}

.mockup-generator h5 {
    margin: 0 0 16px 0;
    color: var(--forest-green);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-generator p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 14px;
}

.content-input {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.content-input h6 {
    margin: 0 0 16px 0;
    color: var(--forest-green);
    font-size: 14px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 16px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ===== MOCKUP TEMPLATES ===== */
.mockup-templates {
    margin-bottom: 24px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.template-option {
    background: none;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-option.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.template-option:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.template-preview {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    margin: 0 auto 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.desktop-preview {
    background: linear-gradient(to bottom, #e5e7eb 20%, #f9fafb 20%);
}

.mobile-preview {
    width: 30px;
    height: 50px;
    background: linear-gradient(to bottom, #374151 10%, #f9fafb 10%);
    border-radius: 8px;
}

.card-preview {
    height: 35px;
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
}

.brochure-preview {
    background: linear-gradient(to right, #8b5cf6 33%, #7c3aed 33%, #7c3aed 66%, #6d28d9 66%);
}

.social-preview {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    border-radius: 50%;
}

.logo-preview {
    background: radial-gradient(circle, #8b5cf6, #7c3aed);
}

.template-option span {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

/* ===== CUSTOMIZATION CONTROLS ===== */
.customization-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.color-scheme {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-scheme label {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.color-options {
    display: flex;
    gap: 8px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option.active {
    border-color: #8b5cf6;
    transform: scale(1.1);
}

.color-option:hover {
    transform: scale(1.05);
}

.layout-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layout-options label {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.layout-options select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

/* ===== MOCKUP ACTIONS ===== */
.mockup-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.generate-mockup-btn,
.generate-variations-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.generate-mockup-btn:hover,
.generate-variations-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.generate-variations-btn {
    background: #10b981;
}

.generate-variations-btn:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ===== MOCKUP GALLERY ===== */
.mockup-gallery {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.mockup-gallery h6 {
    margin: 0 0 16px 0;
    color: var(--forest-green);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gallery-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.1);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 92, 246, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-action {
    background: white;
    color: #8b5cf6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-action:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.gallery-info {
    padding: 12px;
}

.gallery-info h6 {
    margin: 0 0 4px 0;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.gallery-template {
    font-size: 11px;
    color: #6b7280;
    text-transform: capitalize;
}

/* ===== PROCESSING QUEUE ===== */
.processing-queue {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.queue-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

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

.queue-item:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.queue-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 14px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
    word-break: break-all;
}

.file-meta {
    font-size: 11px;
    color: #6b7280;
}

.queue-actions {
    display: flex;
    gap: 4px;
}

.queue-action {
    background: none;
    border: none;
    color: #6b7280;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-action:hover {
    background: #fee2e2;
    color: #dc2626;
}

.queue-progress {
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.progress-text {
    font-size: 12px;
    color: #6b7280;
    text-transform: capitalize;
}

/* ===== QUEUE RESULTS ===== */
.queue-result {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 12px;
}

.result-preview {
    margin-bottom: 12px;
}

.result-image {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.result-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.compression-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.compression-ratio {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
}

.size-info {
    font-size: 11px;
    color: #6b7280;
}

.download-btn,
.share-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.download-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.share-btn {
    background: #10b981;
}

.share-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ===== PROCESSING STATUS ===== */
.processing-status {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 10;
}

.status-content {
    text-align: center;
    max-width: 300px;
}

.status-spinner {
    font-size: 48px;
    color: #8b5cf6;
    margin-bottom: 16px;
}

.status-text h6 {
    margin: 0 0 8px 0;
    color: var(--forest-green);
    font-size: 16px;
    font-weight: 600;
}

.status-text p {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 14px;
}

/* ===== QUICK ACTIONS ===== */
.tools-quick-actions {
    padding: 16px 24px 20px;
    background: var(--warm-beige);
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    border-radius: 0 0 20px 20px;
}

.tools-action-btn {
    flex: 1;
    background: var(--forest-green);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tools-action-btn:hover {
    background: var(--accent-moss);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 61, 46, 0.3);
}

/* ===== TOAST NOTIFICATIONS ===== */
.image-tools-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #8b5cf6;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10007;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.3s ease;
    animation: toastSlideIn 0.3s ease-out;
}

.image-tools-toast.error {
    background: #dc2626;
}

.image-tools-toast.info {
    background: #0891b2;
}

.image-tools-toast.success {
    background: #10b981;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .ai-image-tools {
        bottom: 20px;
        left: 16px;
        right: 16px;
    }
    
    .image-tools-panel {
        width: 100%;
        max-width: calc(100vw - 32px);
        height: 85vh;
        bottom: 80px;
        left: 0;
        right: 0;
    }
    
    .image-tools-toggle {
        width: 56px;
        height: 56px;
    }
    
    .tools-icon {
        font-size: 22px;
    }
    
    .tools-tab-content {
        padding: 16px;
        max-height: 60vh;
    }
    
    .upload-zone {
        padding: 24px 16px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .template-grid,
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .background-presets {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .mockup-actions {
        flex-direction: column;
    }
    
    .tools-quick-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .image-tools-panel {
        height: 90vh;
        bottom: 70px;
    }
    
    .tools-tabs {
        flex-wrap: wrap;
    }
    
    .tools-tab {
        font-size: 11px;
        padding: 10px 8px;
    }
    
    .template-grid,
    .style-grid,
    .background-presets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .color-options {
        flex-wrap: wrap;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== ACCESSIBILITY ===== */
.image-tools-toggle:focus,
.tools-close:focus,
.tools-tab:focus,
.tools-action-btn:focus,
.upload-btn:focus,
.generate-mockup-btn:focus,
.generate-variations-btn:focus,
.download-btn:focus,
.share-btn:focus {
    outline: 3px solid #8b5cf6;
    outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .image-tools-panel {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .tools-tab-content {
        color: #e5e7eb;
    }
    
    .tools-tabs {
        background: #374151;
    }
    
    .tools-tab {
        color: #d1d5db;
    }
    
    .tools-tab.active {
        background: #1f2937;
        color: #8b5cf6;
    }
    
    .upload-zone,
    .optimization-settings,
    .background-options,
    .style-settings,
    .edge-refinement,
    .mockup-customization,
    .content-input,
    .processing-queue,
    .queue-item,
    .gallery-item {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.1);
        color: #e5e7eb;
    }
    
    .setting-group label,
    .input-group label {
        color: #d1d5db;
    }
    
    .setting-group select,
    .setting-group input,
    .input-group input,
    .input-group textarea {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
        color: #e5e7eb;
    }
} 