/* Background Blur Tool Styles */

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.drop-zone-modern {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone-modern:hover {
    border-color: #fb983a;
    background: #fff8f3;
}

.drop-zone-modern.dragover {
    border-color: #fb983a;
    background: #fff8f3;
    transform: scale(1.02);
}

.upload-icon {
    display: inline-block;
}

/* Canvas Container */
.canvas-container-wrapper {
    background: #f8f9fa;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.canvas-container {
    position: relative;
    max-width: 100%;
    max-height: 600px;
    margin: 0 auto;
    display: inline-block;
}

#mainCanvas {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    cursor: crosshair;
}

#originalCanvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Comparison Slider */
.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 4px;
    background: #fb983a;
    cursor: ew-resize;
    z-index: 10;
}

.comparison-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #fb983a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.comparison-slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #fb983a;
}

/* Controls Panel */
.controls-panel {
    max-height: 400px;
    overflow-y: auto;
}

.controls-panel .nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.controls-panel .nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 10px 20px;
}

.controls-panel .nav-tabs .nav-link:hover {
    color: #fb983a;
    border: none;
}

.controls-panel .nav-tabs .nav-link.active {
    color: #fb983a;
    background: transparent;
    border: none;
    border-bottom: 3px solid #fb983a;
}

.form-range::-webkit-slider-thumb {
    background: #fb983a;
}

.form-range::-moz-range-thumb {
    background: #fb983a;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem rgba(251, 152, 58, 0.25);
}

/* Button Groups */
.btn-group .btn-outline-primary {
    border-color: #fb983a;
    color: #fb983a;
}

.btn-group .btn-outline-primary:hover,
.btn-group .btn-outline-primary.active {
    background-color: #fb983a;
    border-color: #fb983a;
    color: white;
}

/* Accordion Styling */
.accordion-button {
    background-color: #f8f9fa;
    color: #333;
}

.accordion-button:not(.collapsed) {
    background-color: #fb983a;
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(251, 152, 58, 0.25);
}

.accordion-button::after {
    filter: brightness(0) saturate(100%);
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* Toolbar */
.toolbar-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.toolbar-top .btn-outline-secondary {
    color: white;
    border-color: white;
}

.toolbar-top .btn-outline-secondary:hover {
    background-color: white;
    color: #764ba2;
}

.toolbar-top .btn-primary {
    background-color: #fb983a;
    border-color: #fb983a;
}

.toolbar-top .btn-primary:hover {
    background-color: #e88729;
    border-color: #e88729;
}

/* Selection Tools */
.selection-rectangle {
    position: absolute;
    border: 2px dashed #fb983a;
    background: rgba(251, 152, 58, 0.1);
    pointer-events: none;
}

.selection-circle {
    position: absolute;
    border: 2px dashed #fb983a;
    border-radius: 50%;
    background: rgba(251, 152, 58, 0.1);
    pointer-events: none;
}

/* Brush Cursor */
.brush-cursor {
    cursor: none;
}

.brush-indicator {
    position: absolute;
    border: 2px solid #fb983a;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
}

/* Loading Spinner */
.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.spinner-border {
    color: #fb983a !important;
    width: 3rem;
    height: 3rem;
}

/* Ads */
.ad-sidebar-left,
.ad-sidebar-right {
    position: sticky;
    top: 20px;
}

.ad-728x90 {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
    .controls-panel {
        max-height: none;
    }
    
    .canvas-container-wrapper {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .drop-zone-modern {
        padding: 40px 15px;
    }
    
    .toolbar-top .d-flex {
        justify-content: center !important;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 0 50%;
    }
}

/* Pills Navigation */
.nav-pills .nav-link {
    color: #666;
    background: transparent;
    border: 1px solid #dee2e6;
    margin: 0 5px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-pills .nav-link:hover {
    background: #fff8f3;
    border-color: #fb983a;
    color: #fb983a;
}

.nav-pills .nav-link.active {
    background: #fb983a;
    border-color: #fb983a;
    color: white;
}

/* Tooltips */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Focus indicators */
.form-control:focus,
.form-select:focus {
    border-color: #fb983a;
    box-shadow: 0 0 0 0.25rem rgba(251, 152, 58, 0.25);
}

/* Export Panel */
#exportTab .btn-primary {
    background-color: #fb983a;
    border-color: #fb983a;
    transition: all 0.3s;
}

#exportTab .btn-primary:hover {
    background-color: #e88729;
    border-color: #e88729;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 152, 58, 0.3);
}
