/* ==============================================
   Avatar Cropper Component
   ============================================== */

.avatar-cropper {
    padding: var(--spacing-md);
}

.avatar-cropper-upload {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-placeholder:hover,
.avatar-cropper-upload.dragover .upload-placeholder {
    border-color: var(--accent);
    background: rgba(0, 122, 255, 0.05);
}

.upload-placeholder svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: var(--spacing-md);
}

.upload-placeholder p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.upload-placeholder span {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Cropper Preview */
.cropper-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.cropper-canvas-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
}

#cropper-canvas {
    cursor: grab;
    display: block;
}

#cropper-canvas:active {
    cursor: grabbing;
}

/* Circle overlay */
.cropper-circle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    border-radius: 50%;
}

/* Cropper Controls */
.cropper-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    max-width: 300px;
}

.cropper-controls .btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

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

.change-image-btn {
    margin-top: var(--spacing-sm);
}

.change-image-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    margin-right: var(--spacing-xs);
}

/* Responsive */
@media (max-width: 480px) {
    .cropper-canvas-container {
        width: 250px;
        height: 250px;
    }

    #cropper-canvas {
        width: 250px;
        height: 250px;
    }

    .cropper-controls {
        max-width: 250px;
    }
}
