/* Watermark Tool Styles */

/* Main Workspace */
.watermark-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 16px;
    position: relative;
}

/* Canvas Section */
.canvas-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
    background: repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 20px 20px;
    border-radius: 8px;
    overflow: visible;
}

#preview-canvas {
    display: block;
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
}

.canvas-hint {
    margin-top: 12px;
    color: #888;
    font-size: 14px;
}

.canvas-hint i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* Download Section */
.download-section {
    margin-top: 15px;
    text-align: center;
}

.download-section .btn {
    padding: 14px 40px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
}

#download-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
}

#download-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

/* Watermark Handle */
.watermark-handle {
    position: absolute;
    cursor: move;
    z-index: 10;
}

.handle-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed rgba(76, 175, 80, 0.8);
    pointer-events: none;
}

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 2px solid #fff;
    border-radius: 2px;
    z-index: 11;
}

.resize-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.resize-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.resize-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.resize-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }

/* Controls Panel */
.controls-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #1e1e1e;
    border-radius: 12px;
}

/* Control Groups */
.control-group {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

.control-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Type Buttons */
.type-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.type-btn {
    padding: 12px;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.type-btn i {
    margin-right: 6px;
}

.type-btn:hover {
    border-color: #666;
}

.type-btn.active {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.15);
}

/* Logo Preview */
.logo-preview {
    margin-top: 10px;
    position: relative;
    display: inline-block;
    background: repeating-conic-gradient(#555 0% 25%, #333 0% 50%) 50% / 10px 10px;
    border-radius: 8px;
    padding: 10px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 80px;
    display: block;
}

.remove-logo {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ff4444;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Text Input */
.form-control {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Color Row */
.color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-control-color {
    width: 50px;
    height: 36px;
    padding: 2px;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 6px;
    cursor: pointer;
}

.outline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #aaa;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.outline-check input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}

/* Range Sliders */
.form-range {
    width: 100%;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    appearance: none;
    margin-top: 5px;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Position Grid */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.pos-btn {
    padding: 10px;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #888;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-btn:hover {
    border-color: #666;
    color: #fff;
}

.pos-btn.active {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.15);
    color: var(--primary-color);
}

/* Tile Check */
.tile-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0 !important;
    font-size: 14px;
    line-height: 1;
}

.tile-check input {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.tile-check i {
    margin-right: 0;
}

#tile-options {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #444;
}

#tile-options label {
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
}
 

/* Close Button */
#editor-container {
    position: relative;
}

#editor-container .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

#editor-container .btn-close:hover {
    background: rgba(255, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
    .controls-panel {
        grid-template-columns: 1fr 1fr;
    }
    
    .type-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .controls-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .watermark-workspace {
        padding: 15px;
    }
    
    .position-grid {
        gap: 4px;
    }
    
    .pos-btn {
        padding: 8px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 48px;
    }
}
