/**
 * FotoDigital Photobook - Clipart, Maschere e Font Styles
 */

/* ── CLIPART CATEGORIES TABS ────────────────────────────── */

.mc-clipart-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.mc-cat-tab {
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 16px;
    background: #fff;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mc-cat-tab:hover {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #1565c0;
}

.mc-cat-tab.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

/* ── CLIPART GRID (4 colonne) ───────────────────────────── */

.mc-clipart-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.mc-clipart-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mc-clipart-item:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    border-color: #90caf9;
}

.mc-clipart-item:active {
    transform: scale(0.96);
}

.mc-clipart-item svg {
    width: 100%;
    height: 100%;
}

/* ── MASKS GRID (3 colonne) ─────────────────────────────── */

.mc-masks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px;
}

.mc-mask-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mc-mask-item:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    border-color: #90caf9;
}

.mc-mask-item:active {
    transform: scale(0.95);
}

.mc-mask-item.active {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.25);
}

.mc-mask-preview {
    width: 52px;
    height: 52px;
}

.mc-mask-preview svg {
    width: 100%;
    height: 100%;
}

.mc-mask-item span {
    font-size: 11px;
    color: #666;
    text-align: center;
}

/* ── FONT LIST ──────────────────────────────────────────── */

.mc-font-search {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.mc-font-search input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.mc-font-search input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.15);
}

.mc-font-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 4px 0;
}

.mc-font-category-header {
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: sticky;
    top: 0;
    background: #f5f5f5;
    z-index: 1;
    border-bottom: 1px solid #eee;
}

.mc-font-item {
    padding: 9px 14px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-font-item:hover {
    background: #e3f2fd;
    color: #1565c0;
}

.mc-font-item:active {
    background: #bbdefb;
}

.mc-font-item.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

/* ── SCROLLBAR CUSTOM ───────────────────────────────────── */

.mc-clipart-grid::-webkit-scrollbar,
.mc-font-list::-webkit-scrollbar {
    width: 6px;
}

.mc-clipart-grid::-webkit-scrollbar-track,
.mc-font-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.mc-clipart-grid::-webkit-scrollbar-thumb,
.mc-font-list::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 3px;
}

.mc-clipart-grid::-webkit-scrollbar-thumb:hover,
.mc-font-list::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 768px) {
    .mc-clipart-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mc-masks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mc-font-item {
        font-size: 14px;
        padding: 8px 12px;
    }

    .mc-cat-tab {
        font-size: 11px;
        padding: 4px 10px;
    }
}
