/**
 * CardMaker Designer - Floating Toolbox Styles
 */

/* ========================================
   Floating Toolbox
   ======================================== */
.floating-toolbox {
    position: fixed;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 50;
    user-select: none;
}

.floating-toolbox.minimized {
    min-width: auto;
}

.floating-toolbox.minimized .toolbox-content {
    display: none;
}

/* Toolbox Header */
.toolbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    cursor: move;
    border-bottom: 1px solid var(--border);
}

.floating-toolbox.minimized .toolbox-header {
    border-radius: var(--radius-lg);
    border-bottom: none;
}

.toolbox-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.toolbox-minimize {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbox-minimize:hover {
    background: var(--border);
    color: var(--text);
}

/* Toolbox Content */
.toolbox-content {
    padding: 12px;
}

/* Shape Grid */
.shape-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.shape-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Icon Grid (for future use) */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-btn:hover {
    background: var(--primary-light);
}

/* Color Picker (for future use) */
.color-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--text);
}

/* Font Selector (for future use) */
.font-list {
    max-height: 200px;
    overflow-y: auto;
}

.font-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.font-item:hover {
    background: var(--bg);
}

.font-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ========================================
   Default Positions
   ======================================== */
#textToolbox {
    top: 100px;
    left: 20px;
}

#shapesToolbox {
    top: 260px;
    left: 20px;
}

/* ========================================
   Toolbox Hidden State
   ======================================== */
.floating-toolbox.hidden {
    display: none;
}

/* ========================================
   Drag Ghost
   ======================================== */
.toolbox-drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.8;
}
