/* /tools/fashion-sketchpad/style.css */

/* --- Custom Tool Assets --- */

/* Vertical Toolbar */
.ac-toolbar-vertical {}

/* --- Manager View --- */
.ac-project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ac-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.ac-card-preview {
    height: 180px;
    background: var(--color-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.ac-card-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ac-card-info {
    padding: 1em;
}

.ac-card-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.ac-project-card:hover .ac-card-actions {
    opacity: 1;
}

width: 70px;
background: var(--color-surface);
border-right: 1px solid var(--color-border);
display: flex;
flex-direction: column;
align-items: center;
padding: 15px 0;
gap: 12px;
z-index: 10;
}

.ac-tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ac-tool-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-heading);
}

.ac-tool-btn.active {
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.ac-tool-btn svg,
.ac-tool-btn span {
    font-size: 20px;
}

.ac-tool-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #aaa;
    margin-top: 5px;
}

.ac-sep-horz {
    width: 40px;
    height: 1px;
    background: #eee;
}

/* Color & Size Pickers in Toolbar */
.ac-color-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ddd;
    cursor: pointer;
}

.ac-color-wrap input {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
}

.ac-size-slider {
    writing-mode: bt-lr;
    /* IE/Edge */
    -webkit-appearance: slider-vertical;
    /* Webkit */
    width: 8px;
    height: 80px;
    margin: 5px 0;
}

/* Canvas Area */
.ac-canvas-area {
    flex: 1;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 2em;
    position: relative;
    /* Checkerboard pattern */
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.ac-canvas-stack {
    width: 600px;
    height: 850px;
    /* A4ish ratio */
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    /* Clips drags outside */
}

/* Stack Layers */
.ac-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through by default */
}

.ac-layer-bg {
    z-index: 10;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.ac-layer-bg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ac-layer-stamps {
    z-index: 20;
    pointer-events: auto;
}

/* Clicking a stamp works */

#actb-layer-draw {
    z-index: 30;
    pointer-events: auto;
    cursor: crosshair;
}

/* Drawing is top */
/* When in "Move" mode, we disable pointer events on canvas so we can grab stamps below it */
#actb-layer-draw.pointer-none {
    pointer-events: none;
}


/* Assets Sidebar */
.ac-assets-sidebar {
    width: 250px;
    background: #fff;
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.ac-panel-section {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.ac-panel-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.85em;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

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

.ac-asset-btn {
    aspect-ratio: 1;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
}

.ac-asset-btn:hover {
    border-color: var(--color-primary);
    background: #f9f9f9;
}

.ac-asset-btn svg {
    width: 100%;
    height: 100%;
}

/* Stamps on Canvas */
.ac-stamp {
    position: absolute;
    cursor: grab;
    color: #000;
    /* user-select: none; */
}

.ac-stamp svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.ac-stamp.selected {
    outline: 1px dashed var(--color-primary);
}

.ac-stamp .resize-handle {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: nwse-resize;
    display: none;
}

.ac-stamp.selected .resize-handle {
    display: block;
}

/* Range Inputs */
.ac-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
    margin-top: 5px;
}

.ac-range-row input {
    flex: 1;
}